home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 126-150 / disk_144 / analyticalc / analydocuments.arc / ANALY.DOC next >
Text File  |  1987-08-25  |  258KB  |  5,364 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.                          A N A L Y T I C A L C
  16.  
  17.  
  18.  
  19.                           The Analyst's Tool
  20.  
  21.  
  22.  
  23.                        User Manual and Reference
  24.  
  25.  
  26.  
  27.                     Copyright (C) 1985, 1986, 1987
  28.                                 G.C.E.
  29.  
  30. AnalytiCalc Reference Manual                                    Page 2
  31.  
  32.  
  33.  
  34.                          AnalytiCalc Overview
  35.                               AnalytiCalc
  36.  
  37.       AnalytiCalc  is an electronic spreadsheet program and integrated
  38.  system which was written in  "portable"  Fortran  and  runs  on  your
  39.  AMIGA, PDP11, VAX or MSDOS systems.  It has a variety of commands and
  40.  operates on a "command verb" syntax.  That is, everything you tell it
  41.  is  a  command.   Some  commands  enter  numbers or formulae;  others
  42.  manipulate them or change the  display.   Online  help  is  available
  43.  (though limited) via the Help command (or the F1 key).  
  44.  
  45.       While   the   primary   functionality  provided  is  that  of  a
  46.  spreadsheet, AnalytiCalc contains means for integrating word process-
  47.  ing  documents, running other programs under its control, integrating
  48.  its graphics output, and  accessing  data  files  created  either  by
  49.  selective  writes  from its own screens or by other programs.  Unlike
  50.  single huge programs which attempt to provide every function known to
  51.  Man in one image, AnalytiCalc is a "second generation" integrated en-
  52.  vironment which provides the "glue" that allows you to use  the  best
  53.  other  specialized programs you can find in a smooth way.  It is also
  54.  constructed to work smoothly with other programs, so  that  you  need
  55.  not give up the communications programs, editors, word processors, or
  56.  database managers you already have.  
  57.  
  58.       AnalytiCalc  has 5 major ways of addressing cells, over 78 func-
  59.  tions (more depending on how you count them), over 70 commands  (with
  60.  more variations), unlimited windowing and programmability at the cell
  61.  and the sheet level, 16 digit precision, and a built in online calcu-
  62.  lator.   It  is  designed to handle traditional spreadsheet problems,
  63.  data access problems, equation solving, engineering applications, and
  64.  finance,  and  is designed to be easy to extend both by adding to the
  65.  program itself and by adding commands externally.  The entire program
  66.  can be driven from a command file, and individual cells can be driven
  67.  by one or more command files in addition to  formulas;   commands  in
  68.  these  command  files  allow  programmable control of operations with
  69.  very high flexibility.  
  70.  
  71.       Interfaces  exist  to  graphics  outputs, to word processing in-
  72.  tegration with the spreadsheet (or AnalytiCalc may be used as a  word
  73.  processing  integration tool as a kind of framework document integra-
  74.  tor), to data access from data files separate from the sheet, and  to
  75.  saved  sheets  permitting  access to systems of spreadsheets.  Simple
  76.  methods of moving to other system commands make this program a power-
  77.  ful command interface as well as a unique analytic tool.  
  78.  
  79.       AnalytiCalc is command driven, though a number of these commands
  80.  are automatically generated  by  function  keys.   Its  commands  are
  81.  mnemonic and intended to be extremely fast to use once learned.  
  82.  
  83.  
  84. AnalytiCalc Reference Manual                                    Page 3
  85.  
  86.  
  87.  
  88.       Unlike  nearly  all other spreadsheet type products, AnalytiCalc
  89.  delivers what it promises.  If a cell can be  addressed,  it  can  be
  90.  used,  subject  only to limitations on the amount of disk storage you
  91.  allocate for backing store.  You can use any "n" cells (where "n"  is
  92.  18000  on  the  Amiga or PC) fully with enough disk backup.  Contrast
  93.  this with memory only systems  which  may  address  500,000  or  more
  94.  cells,  but which permit only a few percent of these to be filled be-
  95.  fore running out of room, even on large machines.  (For example,  the
  96.  popular  1-2-3  spreadsheet  on  IBM  PCs is reported to hold at most
  97.  around 12,000 simple formulas on a 544K  machine,  or  around  39,000
  98.  9-digit  numbers.   (Our tests have run out of room at less than 7000
  99.  cells on a  512K  AT.)  In  contrast,  AnalytiCalc  can  hold  32,000
  100.  17-digit  numbers, long formulas, or text strings in its cells, using
  101.  disk store as backup for memory.  The 8088 version currently will run
  102.  in  256K bytes of memory and handle up to 18,000 cells with up to 109
  103.  characters of formula in each.  Thus  the  8088  version  can  manage
  104.  something  over  2.1  megabytes  of  information, while programs like
  105.  1-2-3 V1A are restricted to 0.3  megabytes  approximately  on  normal
  106.  memory  PCs.)  The Amiga version is similar in space to the 8088 ver-
  107.  sion but since it is built  without  overlays  occupies  more  space.
  108.  Preliminary  tests  indicate a 1 megabyte machine may be required for
  109.  the Amiga version, though some overlays may be implemented  to  allow
  110.  use on a 512K Amiga once initial version development is done.  
  111.  
  112.       Since  the  format  of a spreadsheet sometimes needs to vary, no
  113.  simple  fixed  size  can  satisfy  every  need.   For  that   reason,
  114.  AnalytiCalc  allows  its  storage  to  be repartitioned so that up to
  115.  18,000 columns or 18,000 rows may be used.  This is done  under  user
  116.  control  (with  normally  suitable  defaults) and allows use of cells
  117.  anywhere in the 18,000 by 18,000 space.  You cannot  fill  more  than
  118.  18,000  cells (chosen anywhere in the region, since there is no space
  119.  penalty for not using the upper left corner), but you have an address
  120.  range  of 324 million cells.  Legal column names range from A to ZPH,
  121.  and legal row names range from 1 to 18,000, and your display can show
  122.  any  of  this range in as many parts as there are cells shown on your
  123.  screen.  (One application of this would be to use columns  JAN,  FEB,
  124.  MAR,  APR,  MAY,  ...  and TOT for month oriented applications, using
  125.  D## forms of cell addressing to do cross-column sums, if you want  to
  126.  avoid  a line of labels.  This is more of a feat of virtuosity than a
  127.  production technique, but it will work and can be used as you like.) 
  128.  
  129.                              INTRODUCTION
  130.  
  131.       AnalytiCalc's  command  structure  is somewhat unique but simple
  132.  and logical once mastered.  Commands you learned for the  spreadsheet
  133.  system  of  your  choice generally are NOT the same as here.  But you
  134.  CAN perform all the same functions.  
  135.  
  136.       Remember  two  things  first:   in the default mode, you need an
  137.  Enter command ("E ") to enter text or numbers  into  the  sheet,  and
  138.  
  139. AnalytiCalc Reference Manual                                    Page 4
  140.  
  141.  
  142.  
  143.  floating point numbers (most are floating point rather than integers)
  144.  need a period (.) in them to get AnalytiCalc  to  recognize  them  as
  145.  numbers rather than text.  If you forget the period, the numbers will
  146.  be displayed, but only as labels, and the cell will  have  a  numeric
  147.  value of zero.  
  148.  
  149.       If  you  want  a  more "traditional" command interface (entering
  150.  just numbers or formulas or labels/text by default and  starting  all
  151.  commands  with a "/", use the command /;  to get into that mode.  The
  152.  prompt will change from > to :  then as a flag and all commands  will
  153.  need to be entered as /command where the command text is as described
  154.  herein.  The descriptions here apply exactly to the  "command-mostly"
  155.  mode, which is the initial default.  The /;  mode is sometimes called
  156.  the "enter-mostly" mode, as  it  is  convenient  for  entering  large
  157.  amounts  of  textual  or  numeric information.  The command "//" gets
  158.  back to "command-mostly" mode.  
  159.  
  160.       You  can  have  as  many windows onto the sheet on screen as you
  161.  care to define.  Default operation will allow screen redrawing as you
  162.  move  beyond  the edges of the display.  This is more or less a stan-
  163.  dard type scrolling  operation,  and  windows  are  preserved  during
  164.  scrolls,  but  all  move together.  Separate scrolling can be handled
  165.  easily via function keys if desired however.  The NS (NoScroll)  com-
  166.  mand can disable scrolling if desired.  
  167.  
  168.       If  the program's display is not as expected, use a V command to
  169.  redraw the screen and/or a R command to recompute to ensure the  dis-
  170.  play  is  really  incorrect.  Automatic recomputation occurs normally
  171.  when data is entered, so  most  invalid  conditions  due  to  forward
  172.  references in equations or lack of an extra recalculation after copy-
  173.  ing is done are corrected in the normal course of  use.   Because  of
  174.  the  slowness  of the cursor controls, AnalytiCalc attempts to update
  175.  only regions of the display requiring it.  It does  so  by  redrawing
  176.  only  cells that change value.  Occasionally a cell which is modified
  177.  from a TEst command or another cell, or a textual cell,  is  not  up-
  178.  dated.   A View command (V) and/or a RF (Recalculate with Force) com-
  179.  mand generally clear up any glitches.  
  180.  
  181.  
  182.                    Getting Started with AnalytiCalc
  183.  
  184.       The AnalytiCalc spreadsheet asks some questions when you run it,
  185.  to set up its working storage.  
  186.  
  187.                       Initial Questions (Startup)
  188.  
  189.  
  190.       Before AnalytiCalc begins with its screen-oriented operation, it
  191.  looks for a file (in the current directory) called ACINIT.PRM.  If it
  192.  exists,  it is read for replies.  If not, AnalytiCalc asks a question
  193.  
  194. AnalytiCalc Reference Manual                                    Page 5
  195.  
  196.  
  197.  
  198.  about which screen control method  to  use.   AnalytiCalc  uses  ANSI
  199.  escape sequences to control the screen.  
  200.  
  201.       If you want a pre-prepared set of replies for AnalytiCalc's ini-
  202.  tial questions, just create a file ACINIT.PRM.  (You need to reply to
  203.  the  first page worth of questions in an ACINIT.PRM file, so the fol-
  204.  lowing example shows sample replies to the others needed.)  A  simple
  205.  way  to  set  up  replies  would  be  to edit in a file ACINIT.PRM as
  206.  follows:  
  207.  
  208.  N
  209.  Any title desired - use ZA command to reset this.
  210.  22
  211.  22
  212.  1
  213.  1
  214.  
  215.  
  216.  The file just contains the replies as though they were entered on the
  217.  screen.  If the file exists,  the  screen  prompts  will  not  appear
  218.  however.  
  219.  
  220.       After  these commands are put in, any other desired commands can
  221.  also be included to further set up operation.  If you prefer to  come
  222.  up in "enter-mostly" mode, for example, you could put in a command /;
  223.  in this file.  
  224.  
  225.  
  226.                             Initial Screen
  227.  
  228.       When  you  run  AnalytiCalc, it first asks you whether to change
  229.  the default  floating  point  format.   Most  numbers  are  "floating
  230.  point", which means they can have fractional values.  You will seldom
  231.  need integer numbers (which can take on  only  values  -2,000,000,000
  232.  ...   -3,-2,-1,0,1,2,3,4,...   2,000,000,000),  but  will  use normal
  233.  "floating point" ones in which it is legal to have values like  1.35,
  234.  2.5,  and so on.  Just think of "floating point numbers" as a synonym
  235.  for "numbers".  The display format for floating point numbers is ini-
  236.  tially  set  to the Fortran format F9.2 (9 characters wide, 2 decimal
  237.  places), but if you reply Y, it lets you enter any format you like as
  238.  the  default format.  It will try to use it, so if you enter an ille-
  239.  gal format, AnalytiCalc will keep asking for a format until it  finds
  240.  one  that  can display pi (3.14159) correctly.  Note that the default
  241.  sets the format when you first put a value or formula into a cell  to
  242.  be  displayed  numerically.  Once you fill a cell, its display format
  243.  stays until you alter it with the DF command.  Thus if you enter some
  244.  values,  then use the S command (Setup) to change the format default,
  245.  and enter some more cells, only the second group of  numbers/formulas
  246.  entered  will  have the changed display format;  the first group will
  247.  not be changed.  You can have up to 75 separate formats on  a  sheet,
  248.  
  249. AnalytiCalc Reference Manual                                    Page 6
  250.  
  251.  
  252.  
  253.  chosen from among anything that Fortran can display.  (A minitutorial
  254.  appears later in this manual.) 
  255.  
  256.       AnalytiCalc  then  asks  you to enter up to 80 characters as the
  257.  Title of the spreadsheet.  This is displayed at the top of the screen
  258.  and is used as a label for the sheet when printed out.  (The space is
  259.  made available for this rather  than  being  wasted  on  a  copyright
  260.  statement on your screen.) 
  261.  
  262.       To  reply,  enter  any title you like, up to 80 characters long,
  263.  followed (as all AnalytiCalc commands) by a  carriage  return.   This
  264.  will appear across the top of the sheet on screen and in print images
  265.  of it.  You may include any desired leading spaces in the title.   It
  266.  will  be  printed  on screen printouts, so make it descriptive of the
  267.  sheet you'll be using.  (Note it can be excluded  from  printouts  if
  268.  desired  when  row  and column headers are being skipped.) This title
  269.  remains until an S command is given (at which time you can change the
  270.  work  file  also),  though reading in a saved sheet also reads in the
  271.  saved title.  
  272.  
  273.                       Discussion of Scratch Files
  274.  
  275.       The  PDP11  and  PC  versions  of  AnalytiCalc use memory arrays
  276.  backed by temporary disk files for values and  formulas.   These  ask
  277.  how many K (bytes) to reserve on disk for the value file and the for-
  278.  mula file.  Generally there should be  somewhat  more  formula  space
  279.  than  value  space  if  many  long formulae are used;  otherwise pick
  280.  roughly equal values.  These scratch files are deleted on  exit  from
  281.  AnalytiCalc-PC,  but the sheet will NOT run out of room provided suf-
  282.  ficient file space is allocated.  If it runs out due to lack of room,
  283.  a  message on screen will tell which file is out.  Save the sheet and
  284.  restart then with a bigger file.  The  files  are  allocated  on  the
  285.  default disk when you run AnalytiCalc.  
  286.  
  287.                                 Detail
  288.  
  289.       Four questions are asked.  First, AnalytiCalc asks how many rows
  290.  and columns you expect to use on the sheet.  Try to  be  accurate  in
  291.  the  replies you give, but great precision is not necessary.  It will
  292.  then compute the necessary sizes of disk files assuming all the  area
  293.  you  gave  will  be solidly filled in and display these sizes for ad-
  294.  vice.  Then, it asks how many K to  allocate  to  value  and  formula
  295.  backing storage.  Reply with what you want to use on disk;  the files
  296.  will be allocated on your default disk and erased on exit.  
  297.  
  298.       For  a  discussion  of the issues of storage allocation, see the
  299.  Appendix on this at the end of this manual.  
  300.  
  301.       When  these questions are answered, AnalytiCalc will display its
  302.  Calculation Screen.  
  303.  
  304. AnalytiCalc Reference Manual                                    Page 7
  305.  
  306.  
  307.  
  308.                       Calculation Screen Display
  309.  
  310.  
  311.       The  sheet is displayed at the top part of the screen and a com-
  312.  mand cell in Row 23 is shown with the current position encoded.  This
  313.  starts off looking like 
  314.  
  315.      A  1>   (if in "Command-mostly" mode)
  316.       or
  317.      A  1:   (if in "Enter-mostly" mode)
  318.  
  319.  
  320.  and  then  AnalytiCalc  awaits  your commands.  Note that if the cell
  321.  pointed to by the command (which is always a Physical sheet  address)
  322.  is occupied (i.e., has ever had any numbers or text entered into it),
  323.  that cell is displayed in the display in reverse video when  you  are
  324.  positioned there.  If the cell is totally empty, it is not displayed,
  325.  however, in any reverse video.  A pattern  of  blanks  is  displayed,
  326.  wherever the cell is null.  This pattern is in reverse video.  
  327.                                 CONTROL
  328.  
  329.       In "Command-mostly" mode (the default), AnalytiCalc is a COMMAND
  330.  DRIVEN spreadsheet system.  This means that you control the sheet  by
  331.  entering  a  command  followed  by Return.  These commands are in the
  332.  first few  columns  of  the  command  line  and  are  the  first  few
  333.  characters  (often  the first 1 or 2) you type, and they are REQUIRED
  334.  for every command.  AnalytiCalc does NOT assume  any  command  names.
  335.  AnalytiCalc  will translate inputs to upper case unless a " character
  336.  exists in the input string.   Many  of  the  most-used  commands  are
  337.  however  implemented  as single stroke function keys;  the ALT-F1 key
  338.  displays a diagram of these.  The numeric keypad has been implemented
  339.  in as mnemonic a way as possible also, so that arrow keys, home, end,
  340.  page up and down, and control left and right arrows  all  have  their
  341.  expected  meanings.   (For example, End goes to the end of the active
  342.  region, and the INSert key gets into  "Enter  Mode"  (F9  exits  that
  343.  mode) to allow continuous entry of data.) 
  344.  
  345.  
  346.                                  NOTE
  347.  
  348.       If  your  function  keys don't work correctly this way, you
  349.       need to type AUXKPD.TXT to initialize ANSI.SYS for input.  
  350.  
  351.  
  352.  
  353.       (In  "Enter-mostly"  mode,  AnalytiCalc  is much more similar to
  354.  "traditional" spreadsheets in appearance.  If a / is seen to start  a
  355.  command, a one line prompt will appear in line 25 giving some initial
  356.  character mnemonics for commands.  It is not meant to be  exhaustive,
  357.  but just a reminder.) 
  358.  
  359. AnalytiCalc Reference Manual                                    Page 8
  360.  
  361.  
  362.  
  363.                                COMMANDS
  364.  
  365.       The commands available in AnalytiCalc are each described separa-
  366.  tely.  The following is  a  brief  listing  alphabetically  of  their
  367.  names.  Some infrequently used commands are omitted.  
  368.  
  369.   +J filename                Start journaling to filename 
  370.   +N                         Close journal file 
  371.   <                          Rewind input file 
  372.   %prompt%cmd%key%           Issue prompt and do cmd depending on key 
  373.   $ or }                     Perform operating system command 
  374.   > or >>pattern             Search for formula containing or starting
  375.                               with pattern 
  376.   *                          Comment line 
  377.   -prompt                    Load arguments after prompt 
  378.   //                         Use "Command-Mostly" mode 
  379.   /;                         Use "Enter-Mostly" mode 
  380.   /#                         Swap   current   mode   with   save  mode
  381.                               (command-mostly or enter-mostly) 
  382.   1,2,3, or 4                Move cursor Up, Down, Left, or Right 
  383.   @file.typ                  Read file.typ as input instead of console 
  384.   AA nn {R/C}                Add absolute nn rows or columns 
  385.   AR nn {R/C}                Add relocating nn rows or columns (nn may
  386.                               be neg) 
  387.   CA in-range out-range      Copy All (Absolute) 
  388.   CV in-range out-range      Copy Value 
  389.   CF in-range out-range      Copy Formula (and Format) 
  390.   CR in-range out-range      Copy Relocating (all) 
  391.   DB ncol,nrow               Display Bounds (no.  cols,rows on screen) 
  392.   DF range [format]          Display Format of range to format 
  393.   DL range {R/C}n:m          Display  Locate  range as Row/Col to dis-
  394.                               play col:row n:m 
  395.   DS{R/C}{A/D} n             Display Sort row/col, Asc/Desc row/col n 
  396.   DT range {F/I}             Display Type range as Float or Integer 
  397.   DW ncol,wid                Display  Width  of  col  "ncol"  to "wid"
  398.                               chars 
  399.   E expression               Enter expression into cell 
  400.   E" expression              Enter   expression   as   text,  no  case
  401.                               translation 
  402.   ED 'oldstring'newstring'   EDit cell 
  403.   ET expression              Enter expression as UPPER CASE text 
  404.   EV expression              Enter expression as computable formula 
  405.   F filename/nskip           File read from filename onto display 
  406.   G                          Get saved sheet.  Many variants.  
  407.   Hn                         HELP and show page n 
  408.   IR inrange outrange        In  Place Relocate inrange as if moved to
  409.                               outrange 
  410.   K                          Go   into  interactive  calculator  (need
  411.                               *V 3).  *E goes back.  
  412.   L cell                     Go to cell 
  413.  
  414. AnalytiCalc Reference Manual                                    Page 9
  415.  
  416.  
  417.  
  418.   M{0/1/2/3/4/5}             Move - set move direction after enter 
  419.   MS or MH                   Macrocell Show or Hide - show or hide in-
  420.                               cluded files.  
  421.   OA cell                    Origin  Absolute  cell  - Map Screen with
  422.                               cell in upper left 
  423.   OAD cell                   Origin   Absolute  Displace  cell  -  Map
  424.                               Screen with cell in upper  left  leaving
  425.                               old windowing alone 
  426.   OR cell                    Origin   Relative   cell   -  map  screen
  427.                               down/right of cursor with cursor=cell 
  428.   ORD cell                   Origin   Relative  Displace  cell  -  map
  429.                               screen   down/right   of   cursor   with
  430.                               cursor=cell leaving old windows 
  431.   OV +                       OVerride absolute refs, make relative 
  432.   OV -                       OVerride off - let abs refs be absolute 
  433.   P                          Put (save) spreadsheet.  Many variations. 
  434.   R                          Recalculate sheet 
  435.   RB cell                    Set Relocate Boundary at cell 
  436.   RF                         Recalculate, Force recalc of constants 
  437.   RM                         Recalculate  Manual  -  no recalc until R
  438.                               cmd 
  439.   S                          Setup - Global mapping/width/title setups 
  440.   TE expression              TEst  -  Evaluate  math expression in cmd
  441.                               mode - many special variants.  
  442.   V                          View - Redraw screen 
  443.   VF                         View  Formulas  -  Draw with Formulas in-
  444.                               stead of numbers 
  445.   VM                         View Manual - no screen repaint until a V
  446.                               cmd 
  447.   W                          Write display to file or printer.  
  448.   X                          eXit  from AnalytiCalc.  Asks for confir-
  449.                               mation.  
  450.   ZE range               ZEro range of cells 
  451.   ZA                         Zero  All  of  sheet.  Asks for confirma-
  452.                               tion.  Also used for reinitializing.  
  453.  
  454.  
  455. AnalytiCalc Reference Manual                                   Page 10
  456.  
  457.  
  458.  
  459.                           INDIVIDUAL COMMANDS
  460.  
  461.  
  462.                            Moving the Cursor
  463.  
  464.          CURSOR MOTION (Commands to move around
  465.                         the sheet one cell at a time)
  466.  
  467.          1               (Move up)     (or uparrow)
  468.          2               (Move down)   (or down arrow)
  469.          3               (Move left)   (or left arrow)
  470.          4               (Move right)  (or right arrow)
  471.  
  472.  
  473.       The  cursor  motion  keys  move the cursor on the display in the
  474.  direction indicated.  Note these keys are in the same  order  on  the
  475.  keyboard as the arrow keys of the VT100.  
  476.  
  477.       NOTE THAT THE KEYS 1 TO 4 ARE INTERPRETED IN THE SAME WAY AS THE
  478.  UP, DOWN, LEFT, AND RIGHT ARROW KEYS ON THE VT100.   THEY  APPEAR  IN
  479.  THE SAME ORDER AS THE ARROW KEYS ON THE VT100 ON THE KEYBOARD.  
  480.  
  481.       The  X  and  Y accumulators are set to the column number and the
  482.  (row number + 1) respectively  during  commands.   This  allows  pro-
  483.  cedures  to detect cursor position or motion where useful.  These ac-
  484.  cumulators may be used within cells  for  anything;   resetting  them
  485.  does not move the cursor.  
  486.  
  487.       If the arrow keys move to the edge of the screen (or if auto mo-
  488.  tion does this), an automatic  OA  command  is  done  to  effectively
  489.  scroll  the  entire  viewing  screen by the number of rows or columns
  490.  minus 2.  The command  NS  (meaning  No  Scroll)  will  inhibit  this
  491.  redrawing.   The scrolling can be re-enabled by giving the command SC
  492.  (SCroll).  These commands do not redraw anything nor  do  they  cause
  493.  recalculation;   they merely toggle an internal control.  The initial
  494.  state is SCroll mode.  
  495.  
  496.  
  497.  
  498. AnalytiCalc Reference Manual                                   Page 11
  499.  
  500.  
  501.  
  502.                    Insert or Delete Rows or Columns
  503.  
  504.        ADJUSTING PHYSICAL LOCATIONS
  505.        (Adding or Removing Rows or Columns)
  506.      AA  number  R     Add "number" rows ahead of the current physical
  507.             position, moving all cells below the current cell down  by
  508.             "number"  rows  and  losing  the  physical  sheet's bottom
  509.             "number" rows' contents, NOT adjusting variable references
  510.             where the variables are in the moved range and are not the
  511.             position independent (P## or D## forms) type.  
  512.      AA  number C     Add "number" columns ahead of the current physi-
  513.             cal position, moving all cells right of the  current  cell
  514.             right  by "number" columns and losing the physical sheet's
  515.             bottom "number" columns' contents, NOT adjusting  variable
  516.             references  where the variables are in the moved range and
  517.             are not the position independent (P## or D## forms) type. 
  518.      AR  number  R     Add "number" rows ahead of the current physical
  519.             position, moving all cells below the current cell down  by
  520.             "number"  rows  and  losing  the  physical  sheet's bottom
  521.             "number" rows'  contents,  adjusting  variable  references
  522.             where the variables are in the moved range and are not the
  523.             position independent (P## or D## forms) type.  
  524.      AR  number C     Add "number" columns ahead of the current physi-
  525.             cal position, moving all cells right of the  current  cell
  526.             right  by "number" columns and losing the physical sheet's
  527.             bottom  "number"  columns'  contents,  adjusting  variable
  528.             references  where the variables are in the moved range and
  529.             are not the position independent (P## or D## forms) type. 
  530.  
  531.       These  commands  permit  the  operations  known  on other spread
  532.  sheets as "insertion" or  "deletion".   Deletion  takes  place  where
  533.  "number"  is negative and the sense of the motion is reversed.  These
  534.  commands change the physical sheet's contents  and  permit  wholesale
  535.  modifications  to  variable  names (other than P## or D## forms which
  536.  are position independent already and are left  alone  for  simplicity
  537.  and to preserve some of the flexibility of the D## forms which can be
  538.  used for projections of 3D sheets onto  the  display  and  math  with
  539.  ranges  of these).  To save a sheet for merging such selected values,
  540.  both forms, or at least the numeric form, of the Put commands  should
  541.  be used.  
  542.  
  543.       Note  that the previous contents of the rows or columns inserted
  544.  is RETAINED, though it can be zeroed by the ZE  command  if  desired.
  545.  It  will  have  been  copied  also  to  the  lower  or  further-right
  546.  row/column also, but do not be alarmed;  the space is free to re-use.
  547.  You may however elect to use this feature as a shorthand for copy.  
  548.  
  549.       The AR/AA operations take place on the physical sheet and do not
  550.  affect the display sheet mapping to the physical sheet.  
  551.  
  552. AnalytiCalc Reference Manual                                   Page 12
  553.  
  554.  
  555.  
  556.  
  557.  
  558.                      Copying and Replicating Cells
  559.  
  560.       COPYING CELLS
  561.  
  562.     CA V1:V2 V3:V4    Copy all cell attributes from V1:V2
  563.                        to V3:V4.
  564.     CV V1:V2 V3:V4    Copy numeric values only
  565.     CD V1:V2 V3:V4    Copy Display Formats only
  566.     CF V1:V2 V3:V4    Copy Formulas only (no relocation)
  567.     CR V1:V2 V3:V4    Copy all cell attributes as in CA
  568.                 but relocate cell names to new location
  569.                 from old one. Only relocate names right
  570.                 of or below the cursor or on same row/col
  571.                 with cursor (cells above or left of cursor
  572.                 are NOT relocated).
  573.     IR V1:V2 V3:V4    Relocate formulas inplace, computing
  574.                 displacements using distance "moved".
  575.  
  576.  
  577.       The Copy commands let you reproduce cells' contents in other lo-
  578.  cations on your sheet without re-entering them.  The CA form is  most
  579.  useful,  though the CD part can be used to change default formats and
  580.  the others may be handy.  Note that formulas are NOT changed  by  the
  581.  copy operation.  If they should function correctly in their new loca-
  582.  tion relative to different cells, the cell identifications should  be
  583.  position  independent  forms  (P#n#m  for  forms relative to physical
  584.  sheet, D#n#m for forms relative to display sheet) so no  modification
  585.  is  necessary.  CA will normally save all information about a cell in
  586.  the new cell.  
  587.  
  588.       Unlike  the other C class commands, the CR command WILL relocate
  589.  any variable names that are below or to the right of  the  cursor  at
  590.  the time the command is given.  Names above or left of the cursor are
  591.  not changed.  The row and column the cursor is in is included in  the
  592.  relocation  region.  Thus, to be sure names are relocated, use a com-
  593.  mand like L A1 first to position yourself at the top left part of the
  594.  physical  sheet.   BE  SURE  YOU  DO THE REPOSITION IF YOU USE THE CR
  595.  COMMAND!!!!!!!  Note however that if you need certain cells NOT to be
  596.  relocated, the ability to place them above or left of the cursor when
  597.  copying or replicating cells around and having them left alone can be
  598.  useful.   Normalization  factors,  for  instance,  can  be left alone
  599.  (e.g., at the top of a column) and cells referring to them be  copied
  600.  without having them point to the "wrong" normalization cell.  
  601.  
  602.       When  you  specify  one  variable to the C class commands in the
  603.  V1:V2 range location and give a range V3:V4, the  command  will  copy
  604.  the named V1 into all cells in the V3:V4 range.  
  605.  
  606.  
  607. AnalytiCalc Reference Manual                                   Page 13
  608.  
  609.  
  610.  
  611.       The  IR  command  allows  inplace  relocation of formulas.  This
  612.  operates from the cursor to the Relocate Boundary (see  below).   The
  613.  *U HERE function returns the current maximum column used in the W ac-
  614.  cumulator and the current maximum row used in the  Y  accumulator  to
  615.  permit  the repeated use of IR from a command file to simplify moving
  616.  sections of the sheet.  
  617.  
  618.  
  619.                    Setting Size of Display on Screen
  620.  
  621.        DISPLAY BOUNDARIES SETTING (Number rows/cols)
  622.  
  623.      DB n,m    Set number of columns displayed on screen
  624.                  to n, number of rows displayed to m.
  625.  
  626.       The DB command sets display size.  It also effects the number of
  627.  cells modified by the OA and OR  commands,  so  setting  the  display
  628.  small,  doing an OA or OR, then setting it large, leaves the part om-
  629.  itted as it was before the OA or OR.  The displayed window also  con-
  630.  trols  what  is  read in with the F command.  Note that for automated
  631.  text retrieval, the VM command (to turn  off  redisplay  during  com-
  632.  mands)  may  be  useful  in connection with using DB commands, F com-
  633.  mands, and then V commands to turn the display updating back on  from
  634.  command  files  invoked either by auxiliary keypad keys or from @file
  635.  commands.  
  636.  
  637.  For an example of DB, if you want a display of 14 columns by 20 rows,
  638.  the command 
  639.        DB 14,20 
  640.  would be the way to achieve it.  
  641.  
  642.       When  a narrow screen (e.g.  a 40 column screen) is used, the DB
  643.  command may be used to reduce the number of columns  shown  to  allow
  644.  AnalytiCalc  to  operate.   If  your  screen  supports  more  than 80
  645.  columns, AnalytiCalc will allow their use by increasing the number of
  646.  columns seen.  
  647.  
  648.       The  maximum bounds for DB are usually larger than a real screen
  649.  will hold, but the W command will write out up to these larger bounds
  650.  to  allow  long sheet printouts.  On the 8088 version, up to 75 lines
  651.  length are permitted per page.  
  652.  
  653.  
  654.  
  655. AnalytiCalc Reference Manual                                   Page 14
  656.  
  657.  
  658.  
  659.                         Setting Display Format
  660.                                   and
  661.               Changing between Formula and Number Display
  662.  
  663.        DISPLAY FORMAT SETTING
  664.  
  665.        DF V1:V2 [format]   Set Display Format AND
  666.                              set up whether to
  667.                              display formula or number
  668.  
  669.  
  670.       The DF command sets the display format for the variable range V1
  671.  to V2 inclusive to be whatever is in the square  brackets.   This  is
  672.  expected  to  be  a valid FORTRAN FORMAT specifier for display of the
  673.  number and may be up to 9 characters long.  If the  format  specifier
  674.  entered  is  however  just A or L in the first character, the program
  675.  will indicate the text is to be displayed literally, not as a number,
  676.  so  titles and such can be shown.  To display numbers in Fortran A or
  677.  L forms, just use formats like 4A1 or similar;  as long as  there  is
  678.  something  ahead  of the A or L it goes to Fortran.  The program will
  679.  try your format once before writing to disk  to  ensure  against  any
  680.  crashes  that  will damage your file.  Otherwise, the format is up to
  681.  you.  You can even display in octal or hex if you wish!  
  682.  
  683.       The  DF command is used to switch a cell from display of numeric
  684.  information to formula/text display or back on a cell by  cell  basis
  685.  (the  VF  command globally switches cells from numeric to formula and
  686.  back, though a cell set to  display  text  with  DF  always  displays
  687.  text).   To  change  a  cell to numeric, merely use the DF command to
  688.  give it a numeric format (the default is normally F9.2 so the command
  689.  to set, say, cell G3 to be numeric (possibly after entering a formula
  690.  not containing +, -, ., (, or [ characters) would be:  
  691.  
  692.      DF G3 [F9.2] 
  693.  
  694.  for the standard Fortran F9.2 format (2 decimal places, 9 digits wide
  695.  display).  In AnalytiCalc-VM, every cell may have an entirely  unique
  696.  format.   In  AnalytiCalc-PC, however, only a finite number of unique
  697.  formats is possible (usually about 45) since storage  is  in  memory.
  698.  The  design  limit  is  255 unique formats, but very few spreadsheets
  699.  will need more than the 45 normally provided.  Typical ones only have
  700.  2  or  3  unique  formats.   The  formats  may be ANY Fortran formats
  701.  desired.  
  702.  
  703.       The  DF command will also set the type to Floating if the format
  704.  begins with F or E, and will set the type to Integer  if  the  format
  705.  begins with I.  Beyond this (e.g., for octal or hex) you must use the
  706.  DT command (below) to set the storage to floating (8  bytes)  or  in-
  707.  teger (4 bytes).  
  708.  
  709.  
  710. AnalytiCalc Reference Manual                                   Page 15
  711.  
  712.  
  713.  
  714.       The  DF command will attempt to avoid erroneous format inputs by
  715.  trying the format out on your current location.  If errors occur, the
  716.  DF  command  will be quietly ignored, and the program will not crash.
  717.  This makes it difficult to switch to integer displays.  To  switch  a
  718.  cell  or  range  to  integer, you must use the L command to move to a
  719.  cell not shown on the screen, then use the DT command to  change  the
  720.  desired  cells to integer type, then use the DF command to change the
  721.  display format to an integer display format.   The  cells  will  then
  722.  work  correctly  as  integer  cells.   Note  this checking is done by
  723.  AnalytiCalc-Vm and AnalytiCalc-PC only.  
  724.  
  725.       A  cell  may be switched back to* its previous numeric format by
  726.  using the command DF v1 [*] where v1 may be a cell  or  range.   This
  727.  allows  temporary  examination  of  formulas and resetting to numeric
  728.  without losing the format.  
  729.  
  730.                            What Is Displayed
  731.  
  732.           NOTE:  
  733.           There are 2 items in any cell which may be  displayed.   One
  734.           of  these  is the number in the cell, which takes 4 bytes if
  735.           an integer, 8 if floating point, and which is displayed nor-
  736.           mally  using  a  Fortran  FORMAT statement type declaration.
  737.           The other is the FORMULA associated with the cell, which may
  738.           contain just text or labels.  This is selected by the A or L
  739.           formats.  
  740.  
  741.                Thus, the declaration 
  742.           DF A1:A64 [8A1] 
  743.           would  display  the NUMBERs in column A as 8 characters (as-
  744.           suming this makes sense), and would cause strange errors  if
  745.           the number did not make sense as characters.  
  746.           The declaration 
  747.           DF A1:A64 [A] 
  748.           would  display  the  FORMULA TEXT in column A on the screen.
  749.           This normally will always make sense, and is the normal  way
  750.           to display labels.  
  751.  
  752.                          FORMAT microtutorial
  753.  
  754.       To  reset  FORTRAN  Formats, the Fw.d format is useful.  In that
  755.  format, w means an integer giving the width in characters of the out-
  756.  put  number,  and d is the number of decimal places to be shown.  For
  757.  example F9.2 has 9 places total, 2 to the right of a  decimal  point.
  758.  A valid number in this format might be (supposing its' exact value is
  759.  123456.782) 
  760.       123456.78 
  761.       The format F9.1 would give 
  762.       123456.8 (note rounding) 
  763.       The format F10.3 would give 
  764.  
  765. AnalytiCalc Reference Manual                                   Page 16
  766.  
  767.  
  768.  
  769.       123456.782 
  770.  
  771.       You   may   devise   whatever  formats  desired.   In  addition,
  772.  AnalytiCalc will only display the number of characters  that  fit  in
  773.  the column on screen, so display width can be set to remove undesired
  774.  decimals.  
  775.  
  776.                           Other FORMAT types
  777.  
  778.       The  default F9.2 format occupies 9 of the default 10 characters
  779.  of column width.  Where additional labels are needed, the 1Hc or 2Hcc
  780.  formats may be used.  For example, to show dollars, one might write a
  781.  format as [1H$,F9.2] in the DF command.  If  as  an  alternative  one
  782.  wanted  to show thousands of dollars with one decimal place, a format
  783.  like [2H$K,F9.1] would place "$K" ahead  of  each  number.   Thus,  a
  784.  value of 345.67 in the first format would look like 
  785.  $ 345.67 
  786.  and in the second format it would look like 
  787.  $K 345.7 
  788.  (since the spreadsheet only knows numbers, not their dimensions).  
  789.  
  790.       Where it is desired to display large numbers, FORTRAN offers the
  791.  E and G formats (the form of such a format is Ew.d or Gw.d where w is
  792.  the  width  of  the  number as printed and d is the number of decimal
  793.  points).  The E format displays the number as a fraction followed  be
  794.  E  followed  by a power of 10.  The G format chooses a floating point
  795.  display or an E format depending on the number's size.  Note that  in
  796.  E  and G formats, there need to be 4 spaces in the decimal field just
  797.  for the exponent.  
  798.  
  799.       The  format  you  display  in may be wider than the column;  the
  800.  first "n" characters of the number are shown, where "n" is the  width
  801.  of  the column.  Thus, if you use a format like F10.0 (which displays
  802.  10 digits followed by a period), the period  will  not  show  in  the
  803.  default 10 character column width.  
  804.  
  805.       Available  format  designators  for  floating  numbers (the ones
  806.  you'll use almost always) are:  
  807.      Fw.d  - Simple display with w characters of display (counting the
  808.  decimal point) and d decimal places after the decimal;  
  809.      Ew.d  - Display as a fraction followed by Enn where nn is the ex-
  810.  ponent of 10 to multiply the fraction by.  The format kPEw.d causes k
  811.  digits  to  be  displayed to the left of the decimal place, so that a
  812.  format of E10.5 might display the number 73.453 as ".73453E+02" and a
  813.  format of 1PE10.4 would display it as "7.3453E+01".  The w is the to-
  814.  tal number of characters in the display, and  the  d  the  number  of
  815.  decimals shown.  Note that the w must have 4 extra characters to han-
  816.  dle the "E+nn" part of the number.  Very large or small  numbers  can
  817.  be handled by this format where they would be too wide in F format.  
  818.      Gw.d - This format works like the Fw.d format provided the number
  819.  
  820. AnalytiCalc Reference Manual                                   Page 17
  821.  
  822.  
  823.  
  824.  is small enough to fit in the widths  provided,  and  like  the  Ew.d
  825.  format otherwise.  The display will include only d digits (or k+d di-
  826.  gits if using kPGw.d), so for cases where it works, the  Fw.d  format
  827.  is more space efficient.  
  828.      Several "modifier" formats are available.  nHxx allows characters
  829.  xx in the output.  nX includes n spaces.  TRc causes the next  output
  830.  to  appear  c spaces right of the current one, and 'xx' acts like the
  831.  nHxx in outputting characters xx.  The 'xx' or nHxx designators  must
  832.  be  separated  by comma from following format designators.  Also Dw.d
  833.  is equivalent to Ew.d.  The optional forms Ew.dEe and Gw.dEe act like
  834.  Ew.d and Gw.d except that only e digits of exponent are displayed.  
  835.  
  836.  
  837.                 Fine Control Remapping Displayed Cells
  838.  
  839.       DISPLAY LOCATE (Map physical sheet variables
  840.                       onto Display Sheet)
  841.    DL  V1:V2 Rn:m    point at display coordinates (n,m) (col,row) and,
  842.           going left to right  along  a  Row,  copy  in  variables  V1
  843.           through  V2  (actually,  point  those display sheet cells at
  844.           variables V1 thru V2).  
  845.    DL  V1:V2 Cn:m    point at display coordinates (n,m) (col,row) and,
  846.           going top to bottom along a Column,  copy  in  variables  V1
  847.           through  V2  (actually,  point  those display sheet cells at
  848.           variables V1 thru V2).  
  849.  
  850.       The  DL command lets you associate any variables in the physical
  851.  sheet with any location on the display sheet (the display sheet coor-
  852.  dinates  always  count  from 1 as the topmost row or leftmost column,
  853.  through the maximum number there).  This flexible  association  means
  854.  that  in  principle every cell on the display sheet can be a "window"
  855.  in the sense of other sheets, though that would be quite hard to fol-
  856.  low.   If  the  :V2 part of the command is left off, only one display
  857.  cell is changed.  This command is present to give "fine grained" dis-
  858.  play  control.   Most of the time the OA and OR commands will be used
  859.  instead, but this command allows you to tailor a display  as  needed.
  860.  It  is recommended that the journalling be turned on before you issue
  861.  many DL commands to capture them into a file that can be played  back
  862.  (via @file) to recreate the display mapping.  The +J file and +N com-
  863.  mands turn journalling on and off.  
  864.  
  865.  
  866.  
  867. AnalytiCalc Reference Manual                                   Page 18
  868.  
  869.  
  870.  
  871.                     SORTING DISPLAY ROWS or COLUMNS
  872.          SORTING DISPLAYS
  873.  
  874.     DSRA#nn   Sort display on row/col nn (display coord)
  875.  
  876.  
  877.       The  DS  command  sorts  "normally"  ordered display sheets.  It
  878.  operates something like a sorted OA command, the sort key  being  the
  879.  number in a column or row.  The command looks like this:  
  880.  DS Command specifier 
  881.  R  or  C  - Row or Column specifier (i.e.  whether to sort a row or a
  882.  col.) 
  883.  A or D - Ascending or Descending order sort 
  884.  nn - row or column number to sort on.  
  885.  
  886.       The command letters must all appear together.  Thus a command to
  887.  sort Column 4 on the display in Descending order would be:  
  888.  DSCD 4 
  889.  and a command to sort Row 3 in Ascending order is:  
  890.  DSRA 3 
  891.  
  892.  The  sheet  should be in "normal" order (as from an OA command) prior
  893.  to the sort for use.  The area sorted is the part of the  sheet  dis-
  894.  played  (set  by the DB command, so it may actually exceed what shows
  895.  on the screen.  The Amiga version of  AnalytiCalc  normally  supports
  896.  very  large display sheets to permit printout of large displays which
  897.  are not all visible on the screen;  the screen display  discards  all
  898.  the  un-displayable  points, but the print routine, and the sorts, do
  899.  not.) That is, the display sheet size may be  given  as  larger  than
  900.  your  screen  will  display, and the sort will cover that area.  Note
  901.  that ONLY display sheet locations are sorted.  A sort on the PHYSICAL
  902.  sheet  may  be  done  via a cell or sheet program, but this primitive
  903.  does not.  
  904.  
  905.  
  906.  
  907. AnalytiCalc Reference Manual                                   Page 19
  908.  
  909.  
  910.  
  911.                            DATA TYPE control
  912.  
  913.        DATA TYPE SETTING
  914.  
  915.      DT V1:V2 F    Set V1 thru V2 to Floating data type
  916.      DT V1:V2 I    Set V1 thru V2 to Integer data type
  917.  
  918.  
  919.       The  DT command sets Float/Integer attributes on physical cells.
  920.  Initial default is F (8 bytes) but this can set it to I (4  byte  in-
  921.  teger).   Computation  is  done  in floating point always, but I type
  922.  variables will be converted to integer when stored and  may  be  dis-
  923.  played in valid Fortran formats.  This information is stored/restored
  924.  by the P/G class commands.  The type flag may also be set with  a  DF
  925.  command,  which  recognizes I formats as implying that data is of in-
  926.  teger type (if the first character of the format is an I)  and  treat
  927.  other  formats  as  floating point (real) data.  The integer data can
  928.  hold up to + or - about 2 billion.  The floating point representation
  929.  permits  nearly  unlimited size numbers but only has 16 (roughly) di-
  930.  gits precision.  Integer  arithmetic  is,  within  its  valid  range,
  931.  exact.   When  integer data is retrieved, it is converted to floating
  932.  point for calculations and converted back upon storage;  this  avoids
  933.  many potential internal problems of function validity.  
  934.  
  935.  
  936.                          Setting Column Width
  937.  
  938.          DISPLAY WIDTH SETTING
  939.  
  940.      DW N,M     Set column N on display to be M
  941.                    characters wide
  942.  
  943.  
  944.       DW  lets you set any column width.  They are independent of each
  945.  other, and may be set in any order.  Maximum width supported  is  132
  946.  columns.  Note that when many widths are to be varied, the VM mode is
  947.  useful to prevent redrawing the screen between settings;  the V  mode
  948.  can  then  be  reset  once the widths are as desired.  Setting column
  949.  widths is expected to be frequently done via a command file (see  the
  950.  @ command below).  The column number is normally displayed across the
  951.  top of the screen along with the physical  cell  the  display  column
  952.  currently  is  pointing  to  on the top row.  This is shown in a form
  953.  like "AF = 4" in reverse video (or different colors).  You use the  4
  954.  in  this command.  Because some commands (notably this one and the DL
  955.  command above) use DISPLAY coordinates, the columns are  labelled  in
  956.  this  way  to make it easy.  Rows are not labelled because the labels
  957.  take too much space on screen.  
  958.  
  959.  
  960.  
  961. AnalytiCalc Reference Manual                                   Page 20
  962.  
  963.  
  964.  
  965.                              EDIT command
  966.  
  967.          EDIT FORMULAS
  968.  
  969.   ED 'string1'string2'  Replace string1 with string2
  970.                         in current cell formula. Either
  971.                         string may be null if desired.
  972.  
  973.  
  974.       The  ED command allows editing of formulas with some extra bells
  975.  and whistles.  Basically, the new string replaces the old one, EXCEPT
  976.  that it is possible to do some limited argument replacement.  
  977.  
  978.       The  constructs  &1  through  &4 will be replaced by arguments 1
  979.  through 4 as last entered by the "-" command (see below).  These  may
  980.  be  from  0 to 51 characters long each, and multiple & constructs may
  981.  appear in a substitution.  No & constructs may recurse,  however.   A
  982.  second  ED command can have the effect of the recursion in some cases
  983.  however.  
  984.  
  985.       The  construct &5 will evaluate accumulator Z and, if it is in a
  986.  range where it may be so represented, take its integer part and  con-
  987.  vert it to a numeric string (up to 10 characters) in the place of the
  988.  &5.  
  989.  
  990.       The  construct &6 will replace the cell with the contents of the
  991.  integer part of accumulator Z provided that that number is between  1
  992.  and  256.   Thus, any single non-null ASCII code can be entered.  Ac-
  993.  cumulator Z is used to avoid conflicts with %, which is used too fre-
  994.  quently  to reserve for this purpose.  To set up Z interactively to a
  995.  constant, the command "TE Z=nn." will set Z to the value nn.  
  996.  
  997.       The EDited formula is re-entered into the cell after the edit.  
  998.  
  999.       If  the  initial  string  is  null, the EDit command appends the
  1000.  replacement string onto the contents of the cell.  If the replacement
  1001.  string  is null, the corresponding contents of the cell's formula are
  1002.  deleted.  Note that ALL matching strings in the formula are replaced,
  1003.  not  just the first.  If automatic motion has been specified after an
  1004.  Enter, it also occurs after an EDit.   This  allows  a  "dummy"  EDit
  1005.  (e.g.   ED  / / /)  to  simply  move in the default direction without
  1006.  changing any formulas.  
  1007.  
  1008.  
  1009.  
  1010.  
  1011. AnalytiCalc Reference Manual                                   Page 21
  1012.  
  1013.  
  1014.  
  1015.                                  ENTER
  1016.  
  1017.                 (Entering Data and Expression Formats)
  1018.  
  1019.          E expression       Enter expression and set as formula
  1020.                                or text based on contents
  1021.          ET expression      Enter expression and set as text
  1022.          E" expression      Enter expression and set as text.
  1023.                                Note this form does NOT
  1024.                                translate to upper case.
  1025.          EV expression      Enter expression and treat as
  1026.                                computable.
  1027.  
  1028.  
  1029.       This  command enters the given expression at your current cursor
  1030.  position, and may optionally move in some direction that has been set
  1031.  up by the M command (Move) after the entry is made.  
  1032.  
  1033.       The Expression may be text or one or more numbers, functions, or
  1034.  equations (separated by the \ (backslash) character if more than  one
  1035.  per cell) in fully parenthesized infix notation.  The expressions en-
  1036.  tered resemble normal algebraic expressions, with the usual  operator
  1037.  precedence.  There are 26 global accumulators named A through Z (plus
  1038.  a special one named %) available;  the result  of  a  calculation  is
  1039.  always  left  in  the  %  accumulator as well as the cell.  Operators
  1040.  available include addition (+), subtraction (-), multiplication  (*),
  1041.  division  (/),  and exponentiation (** or !), with normal precedence.
  1042.  Many functions are also available, described below, for other  opera-
  1043.  tions.   The  operator evaluation order is functions, exponentiation,
  1044.  multiplication and division, addition and  subtraction,  just  as  in
  1045.  Fortran  and  most  programming  languages (and on most calculators).
  1046.  Parentheses may be used  to  group  calculations  to  override  these
  1047.  defaults.  
  1048.  
  1049.       Simple examples of Enter are:  
  1050.  
  1051.  E 523.458         Enter the number 523.458 into
  1052.                     the current cell
  1053.  E SUM[A3:A15]     Enter the formula to compute the
  1054.                     sum of cells A3 through A15 and
  1055.                     produce the result in the current
  1056.                     cell
  1057.  E MONTHLY REVENUES 
  1058.                    Enter the label "MONTHLY REVENUES"
  1059.                     into the current cell. Notice that
  1060.                     the string does NOT have any of the
  1061.                     characters .[(+_ in it, so it is
  1062.                     treated by default as a label.
  1063.  E (A2+A4+A6+A8+A9*A10+A11*A12)/(SUM[A2,A4,A6,A8]-A13)
  1064.                    Places the above formula into the cell
  1065.  
  1066. AnalytiCalc Reference Manual                                   Page 22
  1067.  
  1068.  
  1069.  
  1070.                     so that it will be evaluated. The
  1071.                     multiplications and divisions are done
  1072.                     before additions and subtractions, as
  1073.                     is the normal mathematical standard.
  1074.                     The formulas may of course contain
  1075.                     references anywhere on the sheet; they
  1076.                     do NOT have to all refer to the same
  1077.                     row or column.
  1078.  
  1079.       The  text  entered  becomes  the  Formula  for  that  cell,  and
  1080.  AnalytiCalc takes a guess as to whether that text is just text  or  a
  1081.  number  to compute.  If the text contains any of the characters (, +,
  1082.  -, ., or [, it is assumed to be a formula, and the cell is marked  as
  1083.  containing  a  computable formula.  Otherwise it is just treated as a
  1084.  label and the formula itself is displayed.  If you find the guess  is
  1085.  not  to  your  liking, the DF command below lets you alter the format
  1086.  and tell AnalytiCalc that the entry is / is not a numeric.  An  addi-
  1087.  tional  special  character  is  the '"' (double quote) character.  If
  1088.  this character appears any- where in the entered formula, AnalytiCalc
  1089.  will  take the formula as text, regardless of whatever else is in it.
  1090.  You can also combine comments and formulas by using a separate state-
  1091.  ment and the *C construct 
  1092.  (e.g.  SUM[A3:A12]\SQRT(%)\*C SQUARE ROOT OF THE LENGTHS) 
  1093.  of  Calc.  Once a cell is set up as numeric or text, it remains as it
  1094.  was originally set until changed (using  the  DF  command,  described
  1095.  below).   The  ET and E" forms of the Enter command force the expres-
  1096.  sion to be entered as non computable so that it is  displayed  rather
  1097.  than  computed.   The EV form forces it to be computed, regardless of
  1098.  whether any special characters exist.  Numbers MUST have decimals  to
  1099.  compute  properly however.  Thus "EV 45" is INCORRECT, where "EV 45."
  1100.  is CORRECT (assuming you want the value 45.   to  be  computed;   the
  1101.  first will not).  If the decimals are omitted, the expressions may be
  1102.  considered integer.  These will be converted, but the conversion  has
  1103.  some  limitations  and  is  advised  against.  Also, integer division
  1104.  truncates results to produce an integer result  (so  that  7/2  would
  1105.  evaluate  to  3,  while  7./2.   would evaluate to 3.5, for example).
  1106.  Thus, to avoid surprises, use decimals.  
  1107.  
  1108.       Commands  will  be translated to upper case unless a " character
  1109.  appears anywhere in the command.  If a " character is found, only the
  1110.  first 2 characters are converted.  
  1111.  
  1112.       On  the PDP11 or VAX, AnalytiCalc will turn the auxiliary keypad
  1113.  feature of a VT100 on to allow use  of  the  auxiliary  keypad  as  a
  1114.  shorthand  for  many user-specifiable command sequences.  On Amiga, a
  1115.  con:  window is used and auxiliary control tasks may  be  invoked  to
  1116.  redefine function keys and/or add pulldown menus.  
  1117.  
  1118.       Most  keys map to indirect files to make customizing AnalytiCalc
  1119.  easier.  These files must be in your current directory  to  be  found
  1120.  
  1121. AnalytiCalc Reference Manual                                   Page 23
  1122.  
  1123.  
  1124.  
  1125.  (or  a  path  search  utility must be used).  The system help file is
  1126.  called PCCHELP.HLP and must also be in your current directory to  en-
  1127.  able the HELP command to work.  However, where filenames are prompted
  1128.  for, AnalytiCalc can accept full pathnames.  If  the  program  cannot
  1129.  open a file for reading which is requested, it will attempt to create
  1130.  an empty file (and warn you of this on the top line of the screen).  
  1131.  
  1132.       Within  command  files,  it is sensible to permit entry from the
  1133.  console of commands after prompts.  Therefore the % command has  been
  1134.  added  to  facilitate  such entry.  There is an alternative method of
  1135.  handling prompts (the "-" command) but  this  one  is  somewhat  more
  1136.  flexible.   You  will find examples of this in some of the .CMD files
  1137.  supplied with AnalytiCalc, and may use it in  your  own  if  desired.
  1138.  The  operation  is  as  follows:  a line beginning in % is assumed to
  1139.  have several fields:  
  1140.  
  1141.  %FLD-1%FLD-2%FLD-3 
  1142.  
  1143.  in  which  FLD-1  if  present is typed out to the screen first.  Then
  1144.  FLD-2 is passed as the command.  If FLD-3 exists and starts with a  ?
  1145.  or  \, then the terminal is read and the result is added onto the end
  1146.  of FLD-2 before the command is passed back to the spread  sheet.   If
  1147.  the  command begins with a space or control character or a \, then it
  1148.  is commented out and the command file falls  past  the  %  line.   If
  1149.  however FLD-3 started with ? and the initial read-in character is not
  1150.  \ or a control character, the command file is rewound.  This  feature
  1151.  is  used  in  the enter command file (AKD.CMD) to implement an "enter
  1152.  mode" somewhat akin to that of Visicalc, Supercalc, or others of that
  1153.  ilk by automatically inserting the "E " of the AnalytiCalc Enter com-
  1154.  mand until a \ is seen.  If FLD-3 should be present and start with  a
  1155.  &  character,  the  auxiliary  file is closed there and console input
  1156.  done as in \ input.  (Note that a control-Z may be used to  terminate
  1157.  Enter  mode  also,  and  F9  is  preset  to terminate it.) This func-
  1158.  tionality is probably less convenient than just using the /;  command
  1159.  to  go  into "enter-mostly" mode now, and should probably be ignored.
  1160.  It is handy in templates to be used by novices though, since it gives
  1161.  extremely easy console data entry in a controlled fashion.  
  1162.                                Examples
  1163.  
  1164.       The expressions that are entered can be numbers or formulas  re-
  1165.  lating  numbers  and  other  cells.  They may also consist of several
  1166.  statements separated by a \ character which will all be evaluated  at
  1167.  that cell, up to 110 characters.  Thus, valid commands might be 
  1168.  
  1169.    E 55.234      Enters value 55.234 at current cell
  1170.    E B4+H2+D5    Cell will contain the sum of cells B4,H2,
  1171.                  and D5.
  1172.    E Totals      Cell contains literal text "Totals".
  1173.  
  1174.                                FORMULAS
  1175.  
  1176. AnalytiCalc Reference Manual                                   Page 24
  1177.  
  1178.  
  1179.  
  1180.       Formulas  may  be used too.  These include 2 classes.  The first
  1181.  are the multi-argument functions, which either appear at the start of
  1182.  their  statements  or  substatements  (alone), or inside expressions.
  1183.  The difference between the classes is that  the  multiargument  func-
  1184.  tions  must  have  cell NAMES or RANGES as their arguments, while the
  1185.  single argument functions can have arbitrary Expressions in their ar-
  1186.  guments.   Otherwise they may mix freely.  All functions listed below
  1187.  may appear in command files or cells, and arguments  must  be  cells,
  1188.  not  expressions or constants.  The IF statement, while it is treated
  1189.  as a function syntactically, may NOT appear  inside  general  expres-
  1190.  sions,  but  must begin a cell equation or sub-equation (i.e., it may
  1191.  begin after a \ in a cell containing several operations).  It  cannot
  1192.  be  used inside command files driving cells, but its functionality is
  1193.  supplied there by the "*J label" function, so no real limitation  ex-
  1194.  ists on capability.  
  1195.  
  1196.  The available multiple argument functions are:  
  1197.    SUM[variables]     Sum of all arguments
  1198.    MAX[variables]     Max of arguments
  1199.    MIN[variables]     Min of arguments
  1200.    AVG[variables]     Average of arguments
  1201.    AVE[variables]     Average of arguments ignoring cells
  1202.                       containing 0.0 (e.g., labels)
  1203.    STD[variables]     Standard deviation squared
  1204.    IF [V1.rel.V2] statement | else-statement
  1205.    AND[variables]     Boolean AND of all variables in list
  1206.    IOR[variables]     Boolean inclusive OR of variables
  1207.    NOT[variable]      Boolean complement of variable
  1208.    XOR[v1,v2]         Boolean exclusive OR of v1,v2
  1209.    EQV[V1,V2]         Boolean "equivalence" of V1,V2
  1210.                       (complement of exclusive OR, true if
  1211.                       bits have the SAME value)
  1212.    CNT[variables]     Number of nonzero variables in list
  1213.    MOD[V1,V2]         Returns V1 modulo V2 (i.e., remainder
  1214.                       of V1/V2 division.)
  1215.    SGN[v1]            Returns 1.0 times sign of V1
  1216.    LKP[var,variables] Lookup variable in "variables" range
  1217.                       greater or equal to var, return its
  1218.                       index (starting with 0) into variables
  1219.                       range.
  1220.    LKN[var,variables] Lookup variable in "variables" range
  1221.                       less than or equal to var, return its
  1222.                       index (starting with 0) into variables
  1223.                       range.
  1224.    LKE[var,variables] Lookup variable in "variables" range
  1225.                       strictly equal to var, return its index
  1226.                       (starting with 0) into range. Note all
  1227.                       LKP, LKN, LKE return the last variable
  1228.                       index if no satisfactory value found.
  1229.    NPV[disc,vars]     Net Present Value of vars (equal time
  1230.  
  1231. AnalytiCalc Reference Manual                                   Page 25
  1232.  
  1233.  
  1234.  
  1235.                       interval numbers), at discount rate
  1236.                       disc where disc is a fraction
  1237.                       (e.g., .12 for 12%). Be sure the arguments
  1238.                       are all cells, not literals, including the
  1239.                       disc argument. Set a cell to the fraction
  1240.                       desired for the disc argument and use its
  1241.                       name in the arguments to NPV, rather than
  1242.                       attempting to use a literal (e.g., 0.12)
  1243.                       directly.
  1244.    IRR[PV,FV,returns] Internal Rate of Return. Will compute
  1245.                       internal rate of return on up to 20
  1246.                       periods, returning rate per period.
  1247.                       The returns are expected to be at
  1248.                       equal time intervals. PV and FV are
  1249.                       initial and final values of investment
  1250.                       and the result is computed via Newton
  1251.                       approximation. As with all functions here,
  1252.                       be sure all arguments are cell names, not
  1253.                       literal numbers.
  1254.    PMT[princ,inter,nper] Payment function. Generates payment
  1255.                       given principal amount, interest per
  1256.                       period (as a fraction), and number of
  1257.                       periods.
  1258.    PVL[pmt,inter,nper] Present Value function. Generates present
  1259.                       value of a loan given payment amount, 
  1260.                       interest rate, and number of periods.
  1261.                       All financial functions assume that
  1262.                       payments are for equal time intervals.
  1263.    RND[V1]            Random number. Generates a random number
  1264.                       distributed uniformly in the interval
  1265.                       0.0 to 1.0. An argument is required but
  1266.                       never touched.
  1267.  
  1268.  In  all  cases  except  IF, arguments are variable names separated by
  1269.  commas, or variable ranges, or mixtures separated by  columns.   Note
  1270.  too  that  ALL  THESE  FUNCTIONS  REQUIRE  CELLS  OR  ACCUMULATORS AS
  1271.  ARGUMENTS;  literals and single argument functions may  NOT  be  used
  1272.  here.   (That is why it is easy to place multiple commands on a line;
  1273.  the ACs or cells may be loaded in "separate" steps.) The IF [] state-
  1274.  ment  is a partial exception since a range may be used to replace ei-
  1275.  ther variable inside the []  condition  brackets.   The  sum  of  the
  1276.  ranges will be used in that case.  A possible IF statement might look
  1277.  like 
  1278.  
  1279.  IF [S2.LT.S5] R=2. | R=0.  
  1280.  
  1281.  The Boolean variables are computed by taking the  integer  values  of
  1282.  the  variables  and performing the appropriate boolean masking opera-
  1283.  tions on them.  The values are returned as whatever type (floating or
  1284.  integer)  the  cell is.  32 bit integers are used.  The CNT operation
  1285.  
  1286. AnalytiCalc Reference Manual                                   Page 26
  1287.  
  1288.  
  1289.  
  1290.  will (generally) omit cells that have  not  been  initialized,  since
  1291.  these  have a value of 0.0 and are not changed unless modified expli-
  1292.  citly.  It may be used to compute a more accurate  average  than  AVG
  1293.  where  many  uninitialized cells add zero values in.  The quotient of
  1294.  the SUM divided by the CNT of a range will give an average of nonzero
  1295.  cells  only.  The LKP function quickly locates a cell in a list where
  1296.  the value is in a desired range;  the *G function may be used to  ex-
  1297.  tract  other  cells  close  to the addressed cell (e.g., beside it or
  1298.  below it).  The LKN and LKE functions are exactly the same but search
  1299.  for lower or equal values instead of greater than values.  This makes
  1300.  varied search strategies easy to do.  These functions are most useful
  1301.  in  user  command files for selecting parts of the sheet according to
  1302.  criteria, as they allow very fast searches  of  large  parts  of  the
  1303.  spreadsheet  from  inside command files.  In this application the LKP
  1304.  class functions would be accessed via  the  TEst  command.   The  NPV
  1305.  function is the standard financial Net Present Value function, assum-
  1306.  ing the discount rate is the fractional interest percent  per  period
  1307.  for  the  amounts  in  the range given, and that the range of numbers
  1308.  represents equal time periods.  Remember to give  a  FRACTION  rather
  1309.  than  a  Percent, so a 5% interest rate per period should be given as
  1310.  .05 for example.  The IRR function will  compute  IRR  given  present
  1311.  value,  future  value, investments per period (for up to 20 periods),
  1312.  and assuming that the periods are equally spaced.  The IRR value  re-
  1313.  turned  is  per  period and must be multiplied by periods per year to
  1314.  get a yearly rate.  Note that other financial functions like PMT  may
  1315.  be  easily  obtained  by  simple  cell programs.  The RND function is
  1316.  provided to give random numbers.  This is useful  in  some  types  of
  1317.  Monte Carlo financial modelling.  If distributions other than uniform
  1318.  ones of random numbers are desired, they may be obtained via standard
  1319.  mathematical  transformations  from  this  uniform distribution.  The
  1320.  random number sequence is identical every  time  the  spreadsheet  is
  1321.  run.   BE  SURE  IN  USING  THESE FUNCTIONS THAT ALL ARGUMENTS ARE IN
  1322.  SPREADSHEET CELLS OR ACCUMULATORS.  LITERALS ARE NOT PERMITTED AS AR-
  1323.  GUMENTS.  Thus, a command like "SUM[A1:A5,5.5]" is illegal.  Instead,
  1324.  use a command like "A=5.5\SUM[A,A1:A5]" or "A=SUM[A1:A5]+5.5".  
  1325.  
  1326.       The  section on the interactive calculator (CALC) mode also men-
  1327.  tions the single argument functions available.  These include  normal
  1328.  trig  and  math functions like SQRT, SIN, COS, ATAN, AINT, ALOG, EXP,
  1329.  SINH, COSH, and some others.  These single argument functions may  be
  1330.  used  in  normal infix notation expressions, and do not have restric-
  1331.  tions on the types of arguments permitted them.  See the  section  on
  1332.  Calc  mode below for the full list.  There are also a large number of
  1333.  functions that are syntactically commands, but which perform calcula-
  1334.  tions.  These are also described in the Calc section and include date
  1335.  and matrix arithmetic and some addressing arithmetic functions.  
  1336.  
  1337.  
  1338. AnalytiCalc Reference Manual                                   Page 27
  1339.  
  1340.  
  1341.  
  1342.                             Variable Names
  1343.  
  1344.       A valid variable name might be H14 or N22 or A3, or the position
  1345.  independent forms P#n#m and D#n#m where n and m are offsets in Physi-
  1346.  cal or Display sheets from the current column and row.  A valid range
  1347.  is 2 variable names separated by colon (:).  Thus the range B2:B12 is
  1348.  valid  and  means  B2  through  B12  inclusive.  The range expression
  1349.  D#0#1:D#0#12 is also valid and means the cells on the  display  sheet
  1350.  in  the  same  column but 1 to 12 rows down from the current cell in-
  1351.  clusive.  (The displacements may be negative too, with - sign to  in-
  1352.  dicate  it,  as D#-3#2 for the display cell 3 columns left and 2 rows
  1353.  down from the current position.) The P# and  D#  forms  are  valuable
  1354.  since they work wherever you move them.  Other variables may be relo-
  1355.  cated when moved (renaming them to  correspond  to  their  new  loca-
  1356.  tions),  but  the P# and D# forms need never change and allow working
  1357.  with projections across the physical sheet in  various  ways.   There
  1358.  are a few restrictions with these forms.  They usually need to be en-
  1359.  closed in parentheses (e.g.  (P#3#5) rather than  P#3#5)  inside  ex-
  1360.  pressions.  For most purposes they do work interchangeably with other
  1361.  name schemes however, though the "normal" naming scheme is  generally
  1362.  easier to use.  Copying with relocation works with normal cell names,
  1363.  provided that the cursor is above and left of  cells  to  be  renamed
  1364.  (see  below).   The keypad copy command normally moves to A1 during a
  1365.  copy for this reason.  The D# forms do not always  work  in  the  ex-
  1366.  tended address areas of the sheet, depending on recalculation mode.  
  1367.  
  1368.       The special construction P#%ab or D#%ab allows relative address-
  1369.  ing relative to current physical or display location using  accumula-
  1370.  tors  named  a  or b (where a or b may be any accumulator name from A
  1371.  through Z but upper case is REQUIRED).  This computable relative  ad-
  1372.  dressing  affords  greater flexibility in command procedure construc-
  1373.  tion.  
  1374.  
  1375.       If a formula contains the construction {VN (where VN is any cell
  1376.  name), the FORMULA for cell VN is inserted  into  the  formula  being
  1377.  evaluated at that point, when the cell value is to be computed.  This
  1378.  may be done several levels deep, but is stopped after 10 translations
  1379.  to  avoid  infinite loops due to circular references.  Some care must
  1380.  be used here since the final  translated  formula  must  fit  in  110
  1381.  characters and will be truncated if it gets too long.  This construct
  1382.  is useful where formulas are to be tested.  These cell names may  (in
  1383.  AnalytiCalc  versions  for 320K and over) be replaced by alphanumeric
  1384.  names of your choice;  this will be  discussed  below.   The  formula
  1385.  replacement  feature provides a handy inline macro capability permit-
  1386.  ting complex formulas to be entered more easily.  This feature may be
  1387.  used  with the P#%ab form of addressing to provide runtime addressing
  1388.  of formulas anywhere in the matrix.  It may also be  used  (with  the
  1389.  position  relative P## forms of cell names) to conserve storage where
  1390.  a long formula must be repeated many  times,  at  the  cost  of  some
  1391.  speed.  
  1392.  
  1393. AnalytiCalc Reference Manual                                   Page 28
  1394.  
  1395.  
  1396.  
  1397.       The  command  processor may use these inline macros in commands.
  1398.  If a command line contains 2 successive underscores (__) anywhere  in
  1399.  its  length, the underscores will be stripped out of the command line
  1400.  and the command line will be scanned  for  {Vn  forms.   If  any  are
  1401.  found,  they  will  be substituted for prior to interpretation of the
  1402.  command.  This will occur AFTER any console text is read  if  console
  1403.  text  is required by one of the %%% forms of command line.  This per-
  1404.  mits formula cells to be used as a convenient place to  store  inter-
  1405.  mediate  answers  in models being driven by command files.  It is not
  1406.  particularly useful from the console, but works, and may be  used  to
  1407.  reenter  a  formula without moving it explicitly if there is a reason
  1408.  to do so.  (ENTER __{Vn).  
  1409.  
  1410.       Since  it is sometimes useful to have mixed formulas which allow
  1411.  certain cell references to be  absolute  and  never  relocated,  with
  1412.  other  references  which are relocatable, cell names may be specified
  1413.  absolute.  If the character "$" (dollar sign)  is  placed  after  the
  1414.  letter,  the number, or both, parts of the variable name, the part of
  1415.  the variable name followed by the dollar sign is absolute.  Thus, the
  1416.  variable  AB30 is relocatable in both row and column.  Variable AB$30
  1417.  is relocatable in row only (the 30 is not followed by $), and the  AB
  1418.  column  will not be changed in any relocate.  Variable AB30$ is relo-
  1419.  catable in column, but the row 30 reference does not  change.   Vari-
  1420.  able  AB$30$ is totally absolute.  Note that these absolute variables
  1421.  are harder to move around even on adding or deleting  rows,  so  they
  1422.  should  be  used  with  care.  This relocation protection can be tem-
  1423.  porarily inhibited with the OV + command and reinstated with the OV -
  1424.  command.   This  will  allow  copy  of cells with relocation if it is
  1425.  needed, without laborious editing.  The program starts in OV -  mode.
  1426.  If  the  OV + mode is set, the program will remain in OV + mode until
  1427.  OV - is set up again.  The commands may be given  in  the  form  OV-,
  1428.  OV -, OV+, or OV +.  
  1429.  
  1430.                             Variable Ranges
  1431.  
  1432.       Variable  ranges  must lie in a single row or column.  Erroneous
  1433.  specifications are rejected and ignored generally.  For  versions  of
  1434.  AnalytiCalc  supporting  matrix  operations,  matrix  dimensions  are
  1435.  however given by specifying the upper left and lower right corners of
  1436.  the  matrices.   Thus the range A1:B2 is the 2 by 2 matrix containing
  1437.  cells A1, A2, B1, and B2.  For operations using full rectangular  re-
  1438.  gions,  support  is offered via auxiliary keypad commands which allow
  1439.  filling of large regions or moving data into them.  This is done  via
  1440.  command  files  automatically invoked, but the methods used are tran-
  1441.  sparent to the user.  Other operations  on  rectangular  regions  not
  1442.  confined  to  a  single row or column may easily be added in the same
  1443.  way.  The internal implementation permits copying rows to columns and
  1444.  vice  versa  as well as rows to rows and columns to columns;  this is
  1445.  why regions must be one or the other.  It is  expected  that  regions
  1446.  are  specified starting at top left and ending at bottom right.  This
  1447.  
  1448. AnalytiCalc Reference Manual                                   Page 29
  1449.  
  1450.  
  1451.  
  1452.  must be done;  regions will not be completely handled otherwise.   By
  1453.  using  in-cell  loops  for their innermost computations, these macros
  1454.  are quite quick in execution and offer few  disadvantages.   They  do
  1455.  however ask separately for the bounds of the areas being modified.  
  1456.  
  1457.                           Function Arguments
  1458.  
  1459.       Note  that  the  square  brackets  ([])  are  needed  to delimit
  1460.  arguments in multiple argument functions.  The results  are  left  in
  1461.  accumulator  % and in the cell.  The IF form will compare 2 variables
  1462.  and execute either the statement or the  else-statement  (which  must
  1463.  NOT be another IF).  The valid relations are:  
  1464.        .EQ.    Equal
  1465.        .NE.    Not Equal
  1466.        .GT.    Greater than (V1 greater than V2)
  1467.        .LT.    Less than (V1 less than V2)
  1468.        .GE.    Greater than or Equal to (V1 >= V2)
  1469.        .LE.    Less than or Equal to (V1 =< V2)
  1470.  and  must  appear  in  this  form.   (Note  that  your  formulas must
  1471.  generally be in upper case only;  text can be anything.) 
  1472.  
  1473.                             Unary Functions
  1474.  
  1475.       The  second  class of formulas permit fully general arguments of
  1476.  expressions, cells, and the like (and are evaluated AFTER  the  multi
  1477.  argument  functions  lexically).   These  are  more conventional, use
  1478.  parentheses, and include single argument functions like  SQRT,  ALOG,
  1479.  EXP, SIN, COS, AINT, ABS, ATAN, and so on.  See the built in interac-
  1480.  tive calculator mode manual section below for more detail.   However,
  1481.  they  may  use variable names as anywhere, not just single letter ac-
  1482.  cumulators.  Thus, SQRT(A5) is a valid number.  There is  a  function
  1483.  list in the documentation of Calc mode later in this manual.  
  1484.  
  1485.                     Accumulators (Scratch Storage)
  1486.  
  1487.       The single letter accumulators of Calc mode (letters A through Z
  1488.  and %) are available globally and may take  on  all  Calc  mode  data
  1489.  types  (see  the  description  of calc mode below) including multiple
  1490.  precision.  They are usable globally on  the  entire  sheet  and  may
  1491.  serve as arguments to command files or return cells for results.  In-
  1492.  side command files, Calc mode can perform any of its  usual  calcula-
  1493.  tions.   The  multi-argument functions listed above are not available
  1494.  there (though they can be simulated by enumerating cells), but every-
  1495.  thing else is.  The letter accumulators are available in all cases in
  1496.  addition to cells.  Of course, any unused cell may be used as an  ac-
  1497.  cumulator  too, but cells in the spreadsheet are at most 8 bytes long
  1498.  and cannot hold multiple precision arguments.  
  1499.  
  1500.  
  1501. AnalytiCalc Reference Manual                                   Page 30
  1502.  
  1503.  
  1504.  
  1505.       To  get,  e.g.,  the square root of the sum of several variables
  1506.  (in a row or column;  ranges may only be in rows or columns together)
  1507.  one might have a formula line like:  
  1508.  
  1509.  SUM[A1:A20,B4,F2,C5:C20,J3:M3]\SQRT(%) 
  1510.  
  1511.  which  computes  the sum of the 2 cells and 3 ranges and leaves it in
  1512.  %, then computes the square root of that and leaves it in  the  cell.
  1513.  The  formulas  to  Calc may be complex but MUST NOT be longer than 78
  1514.  characters.  Break up longer ones so they  can  be  fed  to  Calc  in
  1515.  smaller  chunks.   Notice  that  the expression given could have been
  1516.  written as SQRT(SUM[A1:A20,B4,F2,C5:C20,J3:M3]) but was broken up for
  1517.  tutorial purposes.  
  1518.  
  1519.                    Auxiliary Commands and Functions
  1520.  
  1521.       The  commands  of  CALC  mode  should  be examined carefully for
  1522.  usefulness.  You can enter programs into CALC mode which can be  used
  1523.  as  user-defined  functions  from  the sheet if need be.  See the do-
  1524.  cumentation about the Calc mode  (interactive  calculator)  for  full
  1525.  lists of functions and further information.  
  1526.  
  1527.       Several  commands  available  in  cell calculations which affect
  1528.  computation exist;  several will be described here as well as in  the
  1529.  section on calc mode (which describes single cell calculation facili-
  1530.  ties in addition to those described here).  
  1531.  
  1532.       It  should  be  noted  that  these  functions  start  with the *
  1533.  character which also starts comments in command files to AnalytiCalc.
  1534.  Because  of this, the "Enter-mostly" mode treats any text that starts
  1535.  with * as a  comment.   To  enter  a  FORMULA  beginning  with  an  *
  1536.  character in "Enter-mostly" mode, you must use the syntax 
  1537.  
  1538.       /EV formula 
  1539.  
  1540.  where  formula  might  be  something  like  "*U IDATE"  (without  the
  1541.  quotes), i.e., something that may start with  a  *  character.   This
  1542.  method  allows  the  formula to be entered correctly.  Notice this is
  1543.  the "Command-mostly" command  for  entering  a  formula.   It  ALWAYS
  1544.  works, regardless of the type of formula.  
  1545.  
  1546.       One of these is the *G command.  Its syntax is 
  1547.  
  1548.  *G V1,V2 
  1549.  
  1550.  which  has the effect of evaluating variables V1 and V2 as column and
  1551.  row numbers on the physical sheet and returning  the  physical  sheet
  1552.  variable addressed by those variables.  The ranges are clamped to fit
  1553.  on the sheet.  This  gives  indirect  addressing,  permitting  lookup
  1554.  tables  to  be  made  up  by  creating  the  index  you want and then
  1555.  
  1556. AnalytiCalc Reference Manual                                   Page 31
  1557.  
  1558.  
  1559.  
  1560.  accessing the addressed table  element.   Typically  the  *G  command
  1561.  would  be  the  last  on  a formula line, though it need not be.  Its
  1562.  value is returned in the % accumulator.  
  1563.  
  1564.       Another  is  the  *W command, which simply takes the number in %
  1565.  and places it in the formula for  the  current  cell  on  the  spread
  1566.  sheet.   This may be used to "freeze" a value, replacing a formula by
  1567.  a constant for future use.  Note that the previous  contents  of  the
  1568.  formula  entry  are  lost.  Thus, a *W command in the sheet will nor-
  1569.  mally cause itself to be overwritten after one use.   The  number  is
  1570.  stored in a format D35.24 in the worksheet.  
  1571.  
  1572.       To  implement  user functions, if Calc sees an expression of the
  1573.  form "*@filename.ext", it will execute that file as a command at that
  1574.  cell.   Any filename may be used and as many functions as desired can
  1575.  be handled in this way (with obvious overhead), with nesting depth of
  1576.  up  to  3  permitted.   These command files correspond to "macros" in
  1577.  other spreadsheets, and exist outside the sheet, so  a  command  file
  1578.  can be used by many worksheets.  
  1579.  
  1580.       AnalytiCalc  has also a command called *P which allows resetting
  1581.  of the physical coordinates while executing a  cell's  formulas,  FOR
  1582.  THE  DURATION  OF  THAT  CELL'S FORMULA ONLY or while in K mode (calc
  1583.  mode) only.  
  1584.  
  1585.       The  syntax  of  the  *P command is either just *P (which causes
  1586.  AnalytiCalc to prompt for column and row), or *P Variablename  (which
  1587.  moves   the   current   location  to  the  named  location),  or  *P@
  1588.  variable1,variable2 (which moves to the location which is defined  by
  1589.  variable 1 and 2 as col.  and row).  
  1590.  
  1591.       There  are  several  other useful calculation commands, a few of
  1592.  which are summarized here.  
  1593.  
  1594.       The command *F LABEL 
  1595.  will  evaluate  the  % variable.  If it is positive and nonzero, then
  1596.  the  current  input  line  will  be  rewound  and  the  program  will
  1597.  (silently)  seek a line of the form *CLABEL.  This allows loops to be
  1598.  defined with % as the counter.  This command acts on the unit used by
  1599.  the  AnalytiCalc @ command, NOT the unit for the Calc *@ command, and
  1600.  is a way that the Calc formula conditionals  may  be  reflected  back
  1601.  into  its  command  processing.   The TE expression command should be
  1602.  used first to set the % variable as needed to any arithmetic  expres-
  1603.  sion to control the loop.  
  1604.  
  1605.       The command *J LABEL 
  1606.  will  act as does *F LABEL but its search will be in the current file
  1607.  opened by a Calc *@ command (i.e., an *@file inside  a  cell  on  the
  1608.  sheet,  or  given  from  the console after a K command [see below] to
  1609.  enter bare interactive Calc).  
  1610.  
  1611. AnalytiCalc Reference Manual                                   Page 32
  1612.  
  1613.  
  1614.  
  1615.       The command *QF or *QW file ?searchkey?  <cc> 
  1616.  ("Query  Float" for getting a real ("floating point") number into the
  1617.  sheet from a file, or "Query Write" to write part of a file into  the
  1618.  sheet)  will  open file and look for lines starting with searchkey as
  1619.  given (with _ as a wild character).  Upon finding this, it will  look
  1620.  for  the <cc> and if it finds it, it will select the part of the line
  1621.  in the file between the 2 characters given (which may  be  alike)  as
  1622.  they  are  first  found, and will do one of 2 things.  If the command
  1623.  was *QF, then Calc will Float the value found  there  (attempting  to
  1624.  use  a  large  D format) and return it in %.  If the command was *QW,
  1625.  then Calc will Write the selected part of the record into the formula
  1626.  at  the current physical position on the sheet (which may be reset by
  1627.  an IMMEDIATELY PRECEDING *P command).  The  record  may  contain  the
  1628.  search  key anywhere.  It is up to the user to make sure the formulas
  1629.  copied make sense.  This however allows access to sequential files of
  1630.  data  which  can  be  created by an editor, word processor, etc., and
  1631.  which might hold keyed information that  the  spreadsheet  should  be
  1632.  able to manipulate.  As a user convenience, there may be a second key
  1633.  specified (also inside a pair of ?s).  If  two  keys  are  specified,
  1634.  Calc will search for and require that BOTH be somewhere in the record
  1635.  accepted.  Note too that the files opened may not  have  any  records
  1636.  longer  than 128 characters per line.  There are 2 variant forms, in-
  1637.  volving the 4th character (i.e., the next one after the F or W of *QF
  1638.  or  *QW).   These  may  permit sequential access to a data file.  The
  1639.  *QFK command is exactly like the *QF command (ditto *QWK and *QW) BUT
  1640.  it will not close the data file after finding the desired cell unless
  1641.  it reached EOF.  This permits subsequent commands of the *QFN command
  1642.  (for  "Next")  to  continue  reading the file.  The *QFN command will
  1643.  continue reading the file (the file spec must be  there  but  is  ig-
  1644.  nored) from the next record and will also not close the file.  (Ditto
  1645.  *QWN.) The *QFC command will act exactly as *QFN BUT will  close  the
  1646.  file  when  the request completes.  Thus, a file may be opened with a
  1647.  *QFK (or *QWK) command, subsequent data retrieved by  *QFN  commands,
  1648.  and  finally  the last data retrieved with a *QFC command.  Also, *QF
  1649.  commands will close the file prior to opening another.   The  command
  1650.  mnemonics here may be read as Query File [Next/Close/Keepopen].  
  1651.  
  1652.       Formulas entered may have the following constructs which will be
  1653.  edited into the formula as entered  (so  a  command  file  can  enter
  1654.  them):  
  1655.  
  1656.           _@V1,V2  Means  get  the  values stored in V1 and V2 and use
  1657.                them as column and row locations pointing at some  cell
  1658.                in  the  sheet.  Replace the construct with the name of
  1659.                that cell.  
  1660.           _#V1  Means take the real number in cell V1 and unpack it as
  1661.                if it had been a packed value from  a  formula  with  8
  1662.                characters packed;  then convert it back into ASCII and
  1663.                place in the formula in place of this construct.   This
  1664.                construct  is  intended  to  be  used with the *U STRVL
  1665.  
  1666. AnalytiCalc Reference Manual                                   Page 33
  1667.  
  1668.  
  1669.  
  1670.                function to allow retrieval and edit of formulas.   The
  1671.                *U XQTCM  function  permits use of the EDit command (as
  1672.                well as others) within a cell for string  manipulation.
  1673.                Only  8  characters  at  a time may be represented (the
  1674.                limit imposed by cell size), but  repeated  use  allows
  1675.                handling  any  desired length.  An application would be
  1676.                setting the cell used as V1 to a packed  representation
  1677.                of either of two strings inside an IF [] and then EDit-
  1678.                ing the string into the formula as desired where one of
  1679.                the  2 strings should be made to appear.  This capabil-
  1680.                ity is crude but provides the bare bones functionality.
  1681.                Additional  USRFCT calls to give simpler (but more ver-
  1682.                bose) string manipulations are  not  too  hard  to  add
  1683.                should the user need them.  
  1684.  
  1685.                             Formula Length
  1686.  
  1687.       Formulas have 109 characters allotted to them for use inside the
  1688.  spread sheet.  It may happen these are not enough for use.  In  other
  1689.  spreadsheets, the technique is to put the formulas in other cells in-
  1690.  side the sheet and possibly use screen windows to  avoid  display  of
  1691.  the intermediate results.  
  1692.  
  1693.       While  you can use that technique here too, you have an alterna-
  1694.  tive.  It is to use an indirect file in that cell and inside the cell
  1695.  in the spreadsheet just have a command "*@FILE.TYP" where the file is
  1696.  named "FILE.TYP" (you pick the real name).  Inside this file  may  be
  1697.  whatever calculations you like.  
  1698.  
  1699.       So  long  as  the file is to operate in a fixed cell location in
  1700.  your spreadsheet, you may use variable names like A3, D1,  etc.   in-
  1701.  side  the file.  Your command files may include any multiple argument
  1702.  functions except the IF function.  (The *F and *J  functions  can  be
  1703.  used   to  provide  equivalent  functionality  inside  command  files
  1704.  however.) The only restriction on multiple argument functions is that
  1705.  their arguments must be cells, not general expressions.  
  1706.  
  1707.       Once  you  add  or  delete  rows  or columns, or copy a formula,
  1708.  though, the file may not work as expected if the cell calling it  has
  1709.  moved.   Since  the  relocation  done by AnalytiCalc only operates on
  1710.  formulas stored directly in the spreadsheet, it cannot relocate vari-
  1711.  ables  in the indirect files.  However, you can make the files "posi-
  1712.  tion independent" so they WILL work wherever they  are  called  from.
  1713.  (This has the side benefit that a single file can be called from many
  1714.  cells.) 
  1715.  
  1716.       The  way  to  make  the  files  position  independent  is to use
  1717.  location-relative variable names instead of absolute ones.  That  is,
  1718.  inside  cell  B4,  the  cell  immediately  above can be named B3 (the
  1719.  ABSOLUTE name), or it can be relocatably named P#0#-1  (the  relative
  1720.  
  1721. AnalytiCalc Reference Manual                                   Page 34
  1722.  
  1723.  
  1724.  
  1725.  name).   Likewise  the cell one to the right would be named either C3
  1726.  or P#1#0, and so on.  The cell two down and one left would be  either
  1727.  A5  or  P#-1#2 (you can begin to see how it goes).  A file containing
  1728.  only location-relative variable names will work even if called from a
  1729.  different  cell,  since the references will be figured out when used.
  1730.  These references are more difficult to write than the absolute  ones,
  1731.  but  since they work without renaming, they provide a level of flexi-
  1732.  bility needed where long formulas must be used.  These  forms  should
  1733.  be  used wherever indirect files are used to hold cell formulas.  The
  1734.  computed cell name forms like P#%ab can be used also provided  the  a
  1735.  and b accumulators are initialized properly, or the command file does
  1736.  its own relocation using the X and Y accumulators set on entry.  
  1737.  
  1738.       By using command files, it is possible to add your own functions
  1739.  to the spreadsheet.  Just devise a command  file  that  performs  the
  1740.  arithmetic  and addressing you need and use *@file.typ where you want
  1741.  to evaluate the function.  Arguments can be  passed  in  accumulators
  1742.  and  P## or D## forms can be used for cell addressing (note that it's
  1743.  P#col#row and D#col#row).  The *U HERE function can be used to return
  1744.  the current location in two accumulators to allow address arithmetic. 
  1745.  
  1746.                         Linking Multiple Sheets
  1747.  
  1748.       To  enhance  AnalytiCalc, it is possible to have a cell refer to
  1749.  cells from another, saved sheet anywhere in the  system.   The  sheet
  1750.  must  normally  have  been  saved NUMERICALLY (see PPN command below)
  1751.  starting at the upper left (i.e., cell A1) as would be the convention
  1752.  for using with ACGRAF, the associated graphics output utility.  
  1753.  
  1754.       The command *XV filename V1 
  1755.  will  eXtract  the  Value  of  cell V1 (V1 is any variable name, e.g.
  1756.  C15, AA3, F9, B34, etc.) from the saved sheet saved in filename.  The
  1757.  filename  is  any  legal host system file specifier.  Note that there
  1758.  may be as many files as desired here, but only one cell is returned. 
  1759.  
  1760.       If  it  is desired to extract a formula from a saved sheet saved
  1761.  NON-NUMERICALLY, the command form is 
  1762.  *XF filename V1 
  1763.  and  this will cause the formula in "filename"'s cell V1 to overwrite
  1764.  the current physical sheet.  To avoid this, one might write a formula
  1765.  like 
  1766.  
  1767.  *P V2 \*XF myfile.typ V1 
  1768.  
  1769.  which  would  cause  current  sheet  variable V2 to have its' formula
  1770.  loaded from saved sheet "myfile.typ"'s variable V1.   Note  too  that
  1771.  the GPR or GDR commands will load saved sheets onto the current sheet
  1772.  (starting at the cursor) with all formulas relocated, so that  entire
  1773.  saved  sheets  can  be merged quickly where the one by one operations
  1774.  just described would be too slow.  
  1775.  
  1776. AnalytiCalc Reference Manual                                   Page 35
  1777.  
  1778.  
  1779.  
  1780.       In  general, save your sheets symbolically (non-numerically) for
  1781.  archival purposes;  save numerically for post processing or  handling
  1782.  of  data  by  "master"  sheets or for graphics.  You may want to edit
  1783.  AUXKPD.TXT so that F4 saves the entire sheet  both  symbolically  and
  1784.  numerically  if you frequently do both and want the two to be in syn-
  1785.  chronism.  The default save, PPX, now saves both numbers  and  values
  1786.  so it is normally all that is needed.  
  1787.  
  1788.  
  1789.            Loading Non-AnalytiCalc text files onto the Sheet
  1790.  
  1791.        FILE LOADING
  1792.  
  1793.    F filename/nnnn      Read filename, skipping nnnn lines
  1794.                      if the "/nnnn" is there, and load
  1795.                      contents onto the currently displayed
  1796.                      screen, broken into columns as the
  1797.                      current screen is set up.
  1798.  
  1799.       This  command is designed to make it easy to load document files
  1800.  into AnalytiCalc in quasi-image mode.  Once  loaded,  the  characters
  1801.  are  in formula cells and may be moved around the sheet.  The display
  1802.  format must be reset to get them to be  treated  as  non-text;   this
  1803.  command  will  reset  all  loaded  cells  to text format display.  It
  1804.  repaints the screen upon loading.  This feature makes it easy to cap-
  1805.  ture data in AnalytiCalc from other unrelated programs.  You can com-
  1806.  pute with cells that are loaded in this way but contain valid numeric
  1807.  data  by  changing them to numeric cells by the DF range [*] command.
  1808.  If you need to add decimals to the end of  the  cells'  numbers,  the
  1809.  ED //./  command  will  add  a decimal to the end of a number and the
  1810.  ED / // command can be used to get rid of extra space characters in a
  1811.  formula.  
  1812.  
  1813.  
  1814.  
  1815. AnalytiCalc Reference Manual                                   Page 36
  1816.  
  1817.  
  1818.  
  1819.                   Getting Saved Sheet Data from Files
  1820.  
  1821.        RESTORING YOUR SPREADSHEET
  1822.  
  1823.      GD          Reload sheet down/right onto display
  1824.                  coordinates.
  1825.      GP          Reload sheet down/right onto physical
  1826.                  coordinates.
  1827.      GPR         Reload sheet onto physical coords and Relocate
  1828.                  formulas as if the saved A1 cell were moved
  1829.                  to the current cursor.
  1830.      GDR         Similar to GPR but on display coordinates.
  1831.      Gxx+        Add saved sheet (if default save) values
  1832.                  to current values; enters Recalc Manual mode.
  1833.      Gxx-        Subtract saved sheet (if default save) values
  1834.                  from current values. Also enters Recalc Manual
  1835.                  mode.
  1836.  
  1837.  
  1838.       The  GP/GD  commands  are  the inverse of the PP/PD commands and
  1839.  load those files to potentially new locations.  This  is  the  simple
  1840.  way  to  merge  sheets.  In these cases, you are separately asked for
  1841.  filenames and limits on what part of the sheets to  load/save.   Only
  1842.  cells  that  are  marked in use are saved, so sparse sheets take less
  1843.  space than saving the direct access files.  Note that on save or  re-
  1844.  store  the  ranges  to  restore  are asked for.  To restore the sheet
  1845.  starting at the cursor, specify the lowest row/column offset of 1 and
  1846.  the  highest either 0 or a very large number.  Any rectangular region
  1847.  can be restored by giving the X and Y coordinates of the  lowest  and
  1848.  highest  offsets from the upper left to restore, counting from 1.  If
  1849.  the P or D is omitted from the GPx or GDx commands (where x is either
  1850.  R  or  anything  else),  the action will be determined by whether the
  1851.  sheet was saved by a PP or by a  PDx  command.   REMEMBER:   THE  LOW
  1852.  OFFSET SHOULD BE 1 OR LARGER, NOT 0.  
  1853.  
  1854.       The  GPR  or  GDR commands relocate a saved sheet to a new loca-
  1855.  tion.  If for example a sheet is saved from A1 on down and right,  if
  1856.  it  is  loaded into another sheet when the cursor is at another cell,
  1857.  all formulas are relocated on load so that they are correct  for  the
  1858.  new  location.   (This follows the normal relocation control rules so
  1859.  that the $ forms of names may inhibit relocation.) The intent of this
  1860.  is that it makes it trivial to merge multiple sheets and make summary
  1861.  sheets.  
  1862.  
  1863.       In  AnalytiCalc/Amiga,  the  logic  to  write  to cells involves
  1864.  checks of the built in symbol table to ensure that cells are not pre-
  1865.  viously  there and needing to be replaced.  This slows the Get opera-
  1866.  tion considerably, and is normally bypassed.  However, where a  saved
  1867.  sheet  is  being merged into an existing sheet (rather than restoring
  1868.  into a previously empty region of the sheet), the full logic  may  be
  1869.  
  1870. AnalytiCalc Reference Manual                                   Page 37
  1871.  
  1872.  
  1873.  
  1874.  needed for correct operation.  To get it, enter the filename followed
  1875.  by "/M" (so that to read SAVESHEET.PCC in the  full-update  mode  you
  1876.  reply  SAVESHEET.PCC/M  to  the "Enter Filename>" prompt, rather than
  1877.  just SAVESHEET.PCC, as an example.) (M stands for Merge.) 
  1878.  
  1879.       The  +  or - modifiers in the 4th character of the command allow
  1880.  you to add or subtract multiple saved sheet  values.   These  require
  1881.  that the normal default save (which includes both numeric and formula
  1882.  data) have been done to save the sheets being added.  The  values  in
  1883.  the sheet have the saved values either added (if +) or subtracted (if
  1884.  -) from the current values.  The manual recalculation flag is set  to
  1885.  prevent  any automatic recalculations also, since formulas are loaded
  1886.  from the last sheet loaded and overwrite other formulas in  the  same
  1887.  cells.  (This is generally not a problem.) To manipulate these values
  1888.  if there is a need to, the TEst command and the matrix math functions
  1889.  (which  include  multiply  matrix  by constant) allow two dimensional
  1890.  areas to be moved around or multiplied by constants  without  turning
  1891.  on  the  sheet recalculation.  Thus, averaging 4 sheets could be done
  1892.  by a GP command, three GPx+ commands, and then  a  TE  using  the  *U
  1893.  MMPYC function to multiply the whole area by 0.25.  (One could use TE
  1894.  A=0.25 to get a "cell" A0 to use in the MMPYC  function  if  no  0.25
  1895.  value existed to use already.) 
  1896.  
  1897.  
  1898.                       The AnalytiCalc HELP System
  1899.  
  1900.          HELP
  1901.  
  1902.       Hn     Display a screen of help. (n from 0 thru 9)
  1903.  
  1904.       The  H command will display a screenful of help giving a summary
  1905.  of many AnalytiCalc commands and syntax options.   When  you  type  a
  1906.  second return, it will redraw the screen.  
  1907.  
  1908.       The F1 key also means 'Help', and the ALT-F1 key draws a diagram
  1909.  of the function key assignments.  Control F1 will  draw  a  one  line
  1910.  reminder HELP message on line 25.  
  1911.  
  1912.       There are multiple help pages.  They are selected by commands H0
  1913.  through H99, the number defaulting to  0  and  selecting  which  help
  1914.  screen will appear.  
  1915.  
  1916.  
  1917.  
  1918. AnalytiCalc Reference Manual                                   Page 38
  1919.  
  1920.  
  1921.  
  1922.                   MOVING TO LOCATION (GOTO anywhere)
  1923.  
  1924.        LOCATE CURSOR (GOTO somewhere on the sheet)
  1925.  
  1926.     L variable-name    Position cursor at variable-name
  1927.  
  1928.  
  1929.       The  L  command moves the current position to the variable named
  1930.  on the Physical sheet (and the display sheet if the  variable  is  on
  1931.  the display).  Examples might be SKIP 1 
  1932.      L B3    Move to cell B3 
  1933.      L D6    Move to cell D6 
  1934.  
  1935.  
  1936.        Setting Direction for Motion after Entering Cell Contents
  1937.  
  1938.        MOTION DIRECTION (Set Default
  1939.        Direction to move after an Enter)
  1940.  
  1941.      THIS COMMAND SETS DIRECTIONS FOR AUTOMATIC
  1942.           MOTION AFTER ENTER ONLY.
  1943.      SEE BELOW FOR HOW TO MOVE THE CURSOR AT
  1944.           OTHER TIMES.
  1945.  
  1946.        M0           (Restore last auto move direction)
  1947.        M1           (Move up)
  1948.        M2           (Move down)
  1949.        M3           (Move left)
  1950.        M4           (Move right)
  1951.        M5           (No auto motion)
  1952.  
  1953.  
  1954.       The  M command causes automatic cursor motion after an E command
  1955.  in the direction indicated.  This only occurs  after  an  E  command.
  1956.  The  default  condition is not to move at all after an E command, and
  1957.  this may be reestablished by a command of form M5 (actually Mc, where
  1958.  c  is  any  character other than 1 to 4.) The M0 command restores the
  1959.  last automatic motion direction and saves the current one as the  new
  1960.  last  direction.   This  is useful where a command procedure needs to
  1961.  turn off auto motion but wants to turn it back  on  at  the  end;   a
  1962.  dummy EDit may be used if a single motion is needed.  
  1963.  
  1964.  
  1965.  
  1966. AnalytiCalc Reference Manual                                   Page 39
  1967.  
  1968.  
  1969.  
  1970.                  Including Multiple Files into Reports
  1971.  
  1972.        MS   Macrocell Show (handles &% and &&% files)
  1973.        MH   Macrocell Hide (no special & treatment)
  1974.        &%file,nskip,nshow    overlay file on screen
  1975.        &&%file,snskip,nshow  Include file for output
  1976.  
  1977.       The MS and MH commands turn on or off the handling as print time
  1978.  macros of the &% and &&% forms of filenames.  These permit you to use
  1979.  AnalytiCalc  for  report  generation or outline handling more easily.
  1980.  In MS mode, if a cell has an &%file form in it,  that  file  is  read
  1981.  when  that  cell is displayed.  The first "nskip" records are skipped
  1982.  in the file, and up to "nshow" lines of the  file  are  displayed  on
  1983.  null  cells  of the spreadsheet.  Up to 4 files may be open at a time
  1984.  here.  The left margin of the file text is made to coincide with  the
  1985.  location  of  the  cell  containing the reference.  You can use the $
  1986.  (spawn) command to edit these files with your favorite editor or word
  1987.  processor  on  the  system  and they will automatically be updated on
  1988.  screen.  The &&% form is used to include (possibly lengthy) files  in
  1989.  output.   The  files  are included in spreadsheet output at the point
  1990.  they are seen, indented by the amount of the  indenting  of  the  &&%
  1991.  command  form.  Therefore, you can use AnalytiCalc to organize a mul-
  1992.  tilevel hierarchy of printout of reports.  If a &&% form is  seen  in
  1993.  one  of  the  files being included, that file is opened and included.
  1994.  This nesting may go to a depth of 4  levels.   This  permits  a  real
  1995.  "frame  editing"  using  AnalytiCalc and your favorite editor or word
  1996.  processor (WITHOUT requiring you to learn yet another editor.) 
  1997.  
  1998.       In  general,  AnalytiCalc  is  not  supplied with a text editor.
  1999.  Most people will already have one and it was thought a waste of  time
  2000.  to  ask  anyone  to learn another.  Rather, the program allows you to
  2001.  use whatever editor you like (via the $ or } commands  to  exec  your
  2002.  own  editor) even under the sheet.  What is added is rather the abil-
  2003.  ity to ORGANIZE documents flexibly and  easily.   AnalytiCalc  graphs
  2004.  also are written in a format that permits this treatment.  
  2005.  
  2006.  
  2007.  
  2008. AnalytiCalc Reference Manual                                   Page 40
  2009.  
  2010.  
  2011.  
  2012.                    Resetting Displayed Part of Sheet
  2013.                        (Windowing and Scrolling)
  2014.  
  2015.          ORIGIN RESET  (Windows onto physical sheet)
  2016.  
  2017.      OA variable   Reset origin of display to variable
  2018.      OR variable   Reset display down and right to start
  2019.                        with variable
  2020.      OAD variable   Reset origin of display to variable
  2021.                        leaving windows intact.
  2022.      ORD variable   Reset display down and right to start
  2023.                        with variable leaving windows
  2024.                        intact.
  2025.  
  2026.  
  2027.       The  OA and OR commands let you do quick scrolls around the phy-
  2028.  sical sheet by resetting the upper left corner of the  display  sheet
  2029.  to point at any variable on the physical one and make the rest follow
  2030.  suit (OA), or will reset the display sheet starting at  your  current
  2031.  cursor  location to point at the physical sheet variable and make all
  2032.  parts of the displayed sheet down and right from your  current  loca-
  2033.  tion correspond likewise.  
  2034.  
  2035.       Thus, if you start with a normal initial display and execute the
  2036.  commands 
  2037.  
  2038.      L C1 
  2039.      OR H1 
  2040.  
  2041.  you wind up with columns A and B still on screen, but now the remain-
  2042.  ing columns are H, I, J, K, L instead of C, D, E,  F,  and  G.   This
  2043.  happened  because cell H1, down and right were pointed to by the dis-
  2044.  play sheet starting where you were, which was cell C1, initially  the
  2045.  3rd column and first row.  Had the command been OA H1, the column la-
  2046.  bels would be H-N rather than the initial A-G.  
  2047.  
  2048.       If  the  OAD  or ORD forms are used, the area remapped is simply
  2049.  moved by the offset between the  old  origin  of  the  region  you're
  2050.  remapping  and  the  new origin, so windows stay relatively placed as
  2051.  they were.  Scrolling now uses OAD and ORD forms so windows stay  in-
  2052.  tact.  
  2053.  
  2054.       The  difference  between OA, OAD, OR, and ORD may be illustrated
  2055.  in the following figures, which represent the screen mapping after  a
  2056.  command sequence 
  2057.  
  2058. AnalytiCalc Reference Manual                                   Page 41
  2059.  
  2060.  
  2061.  
  2062.     OA A1
  2063.     L C1
  2064.     OR AA1
  2065.     L A11
  2066.     OR A100
  2067.  
  2068.  which  produces  a  screen mapping like this:  (note only part of the
  2069.  map is reproduced...) 
  2070.  
  2071.           A       B       AA       AB      AC
  2072.     1>   A1      B1      AA1      AB1     AC1
  2073.     2>   A2      B2      AA2      AB2     AC2
  2074.     3>   .       .       .        .       .
  2075.     4>   .       .       .        .       .
  2076.     5>   .       .       .        .       .
  2077.     6>
  2078.     7>
  2079.     8>
  2080.     9>
  2081.    10>  A10     B10    AA10      AB10     AC10
  2082.   100> A100    B100    C100      D100     E100
  2083.   101> A101    B101    C101      D101     E101
  2084.   102>
  2085.   103>
  2086.   104>        and so forth. Note that columns
  2087.   105>           AA, AB, and AC are now mapped
  2088.   106>           for only 10 rows. Thus we have
  2089.   107>           3 screen regions, not 4.
  2090.  
  2091.  
  2092.  While after a sequence like:  
  2093.  
  2094. AnalytiCalc Reference Manual                                   Page 42
  2095.  
  2096.  
  2097.  
  2098.     OA A1
  2099.     L C1
  2100.     OR AA1
  2101.     L A11
  2102.     ORD A100
  2103.  
  2104.  the resulting screen mapping looks more like this:  
  2105.  
  2106.           A       B       AA       AB      AC
  2107.     1>   A1      B1      AA1      AB1     AC1
  2108.     2>   A2      B2      AA2      AB2     AC2
  2109.     3>   .       .       .        .       .
  2110.     4>   .       .       .        .       .
  2111.     5>   .       .       .        .       .
  2112.     6>
  2113.     7>
  2114.     8>
  2115.     9>
  2116.    10>  A10     B10    AA10      AB10     AC10
  2117.   100> A100    B100   AA100     AB100    AC100
  2118.   101> A101    B101   AA101     AB101    AC101
  2119.   102>
  2120.   103>
  2121.   104>        and so forth. Note that columns
  2122.   105>           AA, AB, and AC now extend to
  2123.   106>           the full screen. This gives
  2124.   107>           4 screen regions.
  2125.  
  2126.  
  2127.  
  2128.       These  figures illustrate the usefulness of the OAD and ORD com-
  2129.  mands.  
  2130.  
  2131.  
  2132.  
  2133. AnalytiCalc Reference Manual                                   Page 43
  2134.  
  2135.  
  2136.  
  2137.                          Putting Data to Files
  2138.  
  2139.          SAVING YOUR SPREADSHEET
  2140.  
  2141.      PD        Put out current Display sheet (Formulas)
  2142.      PP        Put out current Physical sheet (Formulas)
  2143.      PDN       Put out current Display sheet (Numbers)
  2144.      PPN       Put out current Physical sheet (Numbers)
  2145.      S         Startup questions. Allows global width
  2146.                and format settings and new title entry.
  2147.  
  2148.  
  2149.       The  S  command will lead to questions being asked about whether
  2150.  to update the display mapping.  If you reply Y, you will be  able  to
  2151.  reset the default display column width to whatever you like between 1
  2152.  and 120 characters and to say whether to reset the display  sheet  to
  2153.  point to the upper left of the physical spreadsheet.  In any case you
  2154.  will be able to reset the default format and the  spreadsheet  title.
  2155.  In AnalytiCalc-Amiga, this is all the S command does.  
  2156.  
  2157.       The  PD  and  PP  commands write Display or Physical sheet cells
  2158.  that are active to a specially formatted sequential ASCII text  file,
  2159.  always  starting  from  the current position of the cursor and saving
  2160.  right and down.  Some questions will be asked so you may enter a max-
  2161.  imum displacement to save (so not all of a large sheet need be saved)
  2162.  in columns and rows.  On reload (the GP/GD commands), these questions
  2163.  are also asked, and minimum displacements are asked also to allow you
  2164.  to enter basically any region of the saved sheets  into  the  current
  2165.  sheet  starting  at  the  current location and moving down and right.
  2166.  This gives a large scale move capability and a sheet  merge  capabil-
  2167.  ity.  
  2168.  
  2169.       The  PPN  and  PDN  commands  save numbers instead of formats to
  2170.  permit loading of isolated numeric values from other sheets by  using
  2171.  the GD or GP commands (below).  They record only numbers and not for-
  2172.  mulas, but this allows any cell's numeric value from other sheets  to
  2173.  be loaded into another sheet without loading all formulas and repeat-
  2174.  ing calculations.  Also, the PPN/PDN commands are needed to  use  the
  2175.  ACGRAF  program  to  graph parts of a sheet if this form of output is
  2176.  desired.  
  2177.  
  2178.       The  PP/PD  commands are suitable for archival storage of spread
  2179.  sheet data, or for its transportation to  differently  compiled  ver-
  2180.  sions of AnalytiCalc.  
  2181.  
  2182.  
  2183.  
  2184. AnalytiCalc Reference Manual                                   Page 44
  2185.  
  2186.  
  2187.  
  2188.                          Recalculation Control
  2189.  
  2190.        RECALCULATE
  2191.    R    Recalculate all of the sheet.
  2192.    RM   Recalculate manually only until R command given
  2193.    RE   Recalculate Entries as made but nothing else until
  2194.           R command given.
  2195.    RI   Recalculate Incremental - Calculate displayed cells only.
  2196.    RM   Recalculate manually only until R command given
  2197.    RAF  Recalculate sheet, without constant recalculation
  2198.    RF   Recalculate, Force constant recalculation.
  2199.    RR   Recalculate, Force, but stay in RE or RI mode if in
  2200.           it already.
  2201.  
  2202.  
  2203.       The  R  command  forces a recalculation of the sheet.  This will
  2204.  evaluate all formulas on the sheet and update the display to show the
  2205.  new  numbers.   Normally,  recalculation is done after each number is
  2206.  entered to update the new cell, but the RF command forces  total  re-
  2207.  calculation  in  case anything was missed.  The standard keypad's Re-
  2208.  calculate key generates the RAF command  automatically  for  ease  of
  2209.  use.  
  2210.  
  2211.       Since these calculations can be time-consuming, you can suppress
  2212.  them while doing  input  by  entering  the  RM  command  (Recalculate
  2213.  Manually)  which  suppresses  recalculation until an R command is en-
  2214.  tered.  This command's format is just 
  2215.  
  2216.  RM 
  2217.  
  2218.  
  2219.       For  further speedups, AnalytiCalc can be put into RE or RI mode
  2220.  to recompute only the cells just entered after each entry, or to com-
  2221.  pute  cells  on  the  display only.  It starts in RI (Recalculate In-
  2222.  cremental) mode until an R command  is  given.   After  an  R  or  RF
  2223.  command  is given, AnalytiCalc goes into a mode where it will compute
  2224.  ALL cells that have anything in them  at  each  sheet  recomputation.
  2225.  Another  RI  or  RE command will return to the previous mode.  The RR
  2226.  command does a RF (Recalculate,  Force  constant  recomputation)  but
  2227.  stays  in Incremental or Entry mode.  Whenever a new sheet is loaded,
  2228.  a single R is done automatically regardless of the current mode.  
  2229.  
  2230.       To  speed  normal  recalculation, AnalytiCalc only computes con-
  2231.  stants once.  The normal RF command will force them to be  recomputed
  2232.  also.   AnalytiCalc  normally  will  keep  track  of  the  lowest and
  2233.  furthest right cells in use and only ever try to recompute cells that
  2234.  have active values there.  
  2235.  
  2236.  
  2237.  
  2238. AnalytiCalc Reference Manual                                   Page 45
  2239.  
  2240.  
  2241.  
  2242.                       Setting Relocation Boundary
  2243.  
  2244.       RELOCATE BOUNDARY
  2245.  
  2246.          RB*     Set maximum row and col for relocation
  2247.                  to end of sheet
  2248.          RB Var  Set maximum row and col to be relocated
  2249.                  to coords of Var (cell name)
  2250.  
  2251.       The  RB command affords a way to specify a lower right corner to
  2252.  the area relocated by any of the copy and relocate operations.  Below
  2253.  or  to the right of the relocation boundary, moves are all treated as
  2254.  absolute even if specified as relative.   Therefore  the  area  below
  2255.  this boundary will not be relocated by the AR commands or the CR com-
  2256.  mands.  This allows the AR operation to relocate only a  finite  max-
  2257.  imum  number  of  rows  or columns, or permits cells moved beyond the
  2258.  boundary specified to be unrelocated.  The upper left corner  of  the
  2259.  relocation  area  is  defined by the cursor position, so this permits
  2260.  any rectangular area to be moved without relocation while the rest is
  2261.  relocated.   Combination  of this feature with the AR and CR commands
  2262.  permits moving rows or columns (or parts of them) via command  files.
  2263.  This moving would generally be done with the IR command to relocate a
  2264.  region in place to be moved to another site, then actually copying it
  2265.  (absolutely) to the desired destination.  Alternatively, the AR/AA/CR
  2266.  commands can be used to move things around.  For example, a rectangle
  2267.  could  be  moved away from the origin further by using the cursor and
  2268.  the RB command to delimit the area to move, then using a command file
  2269.  to  cycle  through  a  set  of CR commands to copy all cells down the
  2270.  desired amount.  The AA command could then be used to delete the  un-
  2271.  desired top cells and the area to be moved now moved into its new ad-
  2272.  dress, all other cells having been relocated.  The  functionality  of
  2273.  moving  cells is however much better served on AnalytiCalc by the OA,
  2274.  OR, and DL commands to reset the display mapping (possibly while log-
  2275.  ging  keystrokes  so  the mapping can be easily reproduced) to effect
  2276.  the desired move.  For simply reformatting  the  screen,  DL  affords
  2277.  control  at  the level of any regions desired.  A command file should
  2278.  be devised for moving cells but only used when really  needed  badly,
  2279.  if  such  actions  are  needed for other reasons.  There will be very
  2280.  little need for them under most circumstances however.   Where  cells
  2281.  must  move  closer  to the origin, an AR command at the origin can be
  2282.  used to provide temporary space in which to move the cells;   at  the
  2283.  end,  they will be moved back further.  The IR command (Inplace Relo-
  2284.  cate) can be used to  avoid  major  moving  around  the  sheet.   The
  2285.  *U HERE  function will return the current max column in accumulator W
  2286.  and the current max row in accumulator Y to facilitate  this.   These
  2287.  maxima  can  be  used to write an efficient command file to copy only
  2288.  the areas in use.  Internal loops in a formula  (with  the  *U  XQTCM
  2289.  function) are the fastest way to implement such a loop.  
  2290.  
  2291.  
  2292.  
  2293. AnalytiCalc Reference Manual                                   Page 46
  2294.  
  2295.  
  2296.  
  2297.                         TEST expression command
  2298.  
  2299.        TEST
  2300.  
  2301.       TE expression    Evaluate expression, save in %
  2302.  
  2303.  
  2304.       The  TEst  command allows command level calculations, for use in
  2305.  controlling loops.  It evaluates the expression (up to 79  characters
  2306.  long)  and  stores in the % accumulator.  Useful for *J type commands
  2307.  to control branching in AnalytiCalc.  Any expression may  be  handled
  2308.  in  a  TE  command,  and  forms of the sort Z=expression are allowed.
  2309.  NOTE however that it is frequently desirable from  command  files  to
  2310.  add a C to the end of the formula since sometimes junk from preceding
  2311.  lines is not zeroed.  The \*C causes it to be treated  as  a  comment
  2312.  and ignored.  
  2313.  
  2314.       The  TEst command will calculate formulas even in restricted re-
  2315.  calculation modes (RM mode, RE mode, or  RI  mode)  since  it  ALWAYS
  2316.  evaluates the expression regardless of mode.  The construct to evalu-
  2317.  ate a cell with a command like 
  2318.  
  2319.       TE V1=__{V1 
  2320.  
  2321.  (which sets a cell value to the computed value of its formula) is ex-
  2322.  plicitly legal and can be used where it is desired to perform irregu-
  2323.  lar partial recomputations while in RM mode.  
  2324.  
  2325.  
  2326.                           VIEWSCREEN Control
  2327.  
  2328.          VIEWSCREEN UPDATE
  2329.  
  2330.       V           Redraw screen with normal formats
  2331.       VF          Redraw screen showing all formulas
  2332.       VM          Don't redraw screen until a V or VF is
  2333.                           given.
  2334.  
  2335.  
  2336.       The V and VF commands redraw the display screen showing numerics
  2337.  as numerics in the selected format (V) or displaying whatever part of
  2338.  the  formulas  fits  on  screen  in  the  column  (VF).  This is used
  2339.  wherever the picture on the screen is  damaged,  e.g.,  by  operating
  2340.  system  broadcasts.   VM  is  used  to  inhibit redraw while numerous
  2341.  changes may be made, to save time.  A V or VF command will re  enable
  2342.  display updates.  
  2343.  
  2344.  
  2345.  
  2346. AnalytiCalc Reference Manual                                   Page 47
  2347.  
  2348.  
  2349.  
  2350.                    Writing ASCII images of Displays
  2351.  
  2352.          WRITING SCREEN TO HARDCOPY OR FILES
  2353.  
  2354.          W     Write screen to file
  2355.  
  2356.       The W command lets you write a hard copy of the screen as it ex-
  2357.  ists on display to a file.  AnalytiCalc will prompt you for the  file
  2358.  name;  the device specifier should be included.  
  2359.  
  2360.       Note that if the filename you enter (or the last character after
  2361.  the device or file specifier) is a "/"  character,  AnalytiCalc  will
  2362.  omit the column and row labels in the output file or printout so that
  2363.  you need not edit them out afterwards.  They will always be displayed
  2364.  on the screen however.  
  2365.  
  2366.       To  output  to  the  lineprinter,  the file specifier to give is
  2367.  PRT:.  The output file in any case has no  strange  escape  sequences
  2368.  and  may be edited with any normal system editor.  To junk any output
  2369.  you don't want, use a filename of NIL and to go to a generic  printer
  2370.  you  may  use a filename of PRT.  If the character "%" appears in the
  2371.  file specifier, the title will not be displayed on printout.  This is
  2372.  designed  to  help  those  producing  paste-together  printouts  from
  2373.  several sheet areas.  
  2374.  
  2375.  
  2376.                              EXIT command
  2377.  
  2378.          EXIT
  2379.  
  2380.    X           Exit to operating system.
  2381.  
  2382.  
  2383.       The  X  command  exits from AnalytiCalc to the operating system.
  2384.  In general, this is the ONLY way (short of an abort  command  to  the
  2385.  operating  system)  to get out of AnalytiCalc, and is the ONLY WAY TO
  2386.  LEAVE GRACEFULLY.  You should use the PP or PD command to  save  your
  2387.  sheet  prior to XD if you want to save your sheet;  otherwise it will
  2388.  be lost.  Be at least that cautious;  the program will NOT keep track
  2389.  of  whether  you've saved the sheet or not.  Please note and use this
  2390.  exit method;  it allows AnalytiCalc to clean up  and  close  windows,
  2391.  which otherwise may not be done.  
  2392.  
  2393.  
  2394.  
  2395. AnalytiCalc Reference Manual                                   Page 48
  2396.  
  2397.  
  2398.  
  2399.                              ZEROing cells
  2400.          ZERO VARIABLES
  2401.  
  2402.     ZA           Zero whole sheet
  2403.     ZE V1:V2     Zero variables in a row or column
  2404.                  in range from cell V1 to cell V2
  2405.                  (V1,V2 = names of cells)
  2406.  
  2407.  
  2408.       The  ZEro  commands clear out a sheet.  The ZA command will also
  2409.  ask if you mean it and needs a reply of Yes to actually  clobber  the
  2410.  whole sheet and return it to pristine purity.  
  2411.  
  2412.       The ZA command occasionally takes a noticeable time to clear the
  2413.  workfiles out;  do not be alarmed at this.  It  will  ask  afterwards
  2414.  for a new title, new display format default for floating point, etc. 
  2415.  
  2416.       If  you give the ZA command, AnalytiCalc will ask you to confirm
  2417.  that you indeed want to zero the entire sheet.  A  reply  of  Y  will
  2418.  proceed  to  execute  the  command;   any  other reply will abort the
  2419.  clearing operation.  
  2420.  
  2421.  
  2422.                         TEXT SEARCH OF FORMULAS
  2423.     SEARCH for formula substring
  2424.  
  2425.      >STRING      Find cell whose formula contains STRING
  2426.      >>STRING     Find cell whose formula starts with
  2427.                      STRING
  2428.  
  2429.  
  2430.       The  >  command  (greater  than sign) causes a search to be made
  2431.  from the current position down and right to the relocate boundary for
  2432.  a  formula  containing  the  string after the >.  The cell found (the
  2433.  first one) will become the current cell.  The origin  is  not  moved,
  2434.  but  the command OA P## will cause the cell found to become the upper
  2435.  left cell on the screen if desired.  This is a handy tool for  locat-
  2436.  ing sections of a large sheet.  The comparison is between the entered
  2437.  string and the formula, but terminates with the shorter.   Therefore,
  2438.  aliasing  occasionally occurs.  Just skip past the offending cell and
  2439.  redo to continue to search.  The >>STRING form anchors the search  at
  2440.  the  start  of  the  string so this will not occur, though very short
  2441.  formulas whose beginnings match the search string  will  match.   The
  2442.  underscore   character  (_)  is  a  wildcard  character  for  formula
  2443.  searches.  
  2444.  
  2445.  
  2446.  
  2447. AnalytiCalc Reference Manual                                   Page 49
  2448.  
  2449.  
  2450.  
  2451.                 Driving AnalytiCalc from Command Files
  2452.  
  2453.       EXECUTING COMMAND FILES
  2454.  
  2455.     @filespec    Read filespec and execute commands
  2456.                  as though typed in.
  2457.  
  2458.  The @ command lets you treat a file as though it  were  your  console
  2459.  input  (returns on endfile) to let you execute saved sets of commands
  2460.  to set up your sheets.  Note that if you issue the K command (below),
  2461.  those inputs come from a separate file on logical unit 1.  
  2462.  
  2463.                    Recording Commands Interactively
  2464.  
  2465.          JOURNALING
  2466.  
  2467.    +J filename   Opens filename as a journal file,
  2468.                  recording commands to that file.
  2469.                  (Note: auxiliary inputs are not so
  2470.                  recorded, where asked for as separate
  2471.                  questions.)
  2472.    +N            Closes any open journal file
  2473.  
  2474.  
  2475.       The  journaling commands allow typed commands to be saved into a
  2476.  file later usable as an indirect command input to AnalytiCalc to  al-
  2477.  low  recreation  of screen formats, data, formulas, etc.  Extra ques-
  2478.  tions (e.g.  those used for filename and areas to save or restore  in
  2479.  P  or  G  class commands) are NOT saved by the journal.  They will be
  2480.  read by @ commands however and may be edited into a journal file with
  2481.  any  editor.   If  this  is desired inside a AnalytiCalc session, the
  2482.  Spawn command (below) is recommended after the +N command is used  to
  2483.  close  the  file.   The  VM  and RM commands are recommended inside @
  2484.  files (with R and V commands at the ends) to suspend display updating
  2485.  and  recalculation  until  all commands in the journal file are done.
  2486.  The Journal command is the way to get AnalytiCalc  to  remember  your
  2487.  keystrokes  when  making  up  any  command  so that you can tell what
  2488.  you're doing.  Later if you don't need to watch  the  screen  update,
  2489.  use  the  VM  command (View Manual) to turn display update off during
  2490.  the command files' operation, and the V (View)  command  to  turn  it
  2491.  back  on at the end.  The major uses of journaling are to save screen
  2492.  formats as they are set up and to allow capture of keystrokes for use
  2493.  in command macros.  
  2494.  
  2495.          Executing Other Programs or Commands from AnalytiCalc
  2496.         $ command-line     EXEC command line to the OS
  2497.                              (minus the $ sign). May
  2498.                              need extra CR to free
  2499.                              console.
  2500.         } command-line     EXEC command line (minus the })
  2501.  
  2502. AnalytiCalc Reference Manual                                   Page 50
  2503.  
  2504.  
  2505.  
  2506.                              and await a return on console
  2507.                              before return to sheet.
  2508.  
  2509.       The  $ command permits AnalytiCalc to spawn commands to the host
  2510.  OS.  The command is whatever follows the $ and results in  that  com-
  2511.  mand  being run as an AmigaDos RUN type command.  This permits use of
  2512.  other system utilities during a session with AnalytiCalc.  The  vari-
  2513.  ant  using the } character rather than the $ character will print the
  2514.  message ENTER RETURN TO REDRAW SPREADSHEET>  at  the  bottom  of  the
  2515.  screen  and  will  not  repaint  the  screen  until the return key is
  2516.  pressed.  This allows you to examine the screen as long as needed be-
  2517.  fore  erasing  and  redrawing the sheet.  NOTE that in a minimum 256K
  2518.  system you will NOT HAVE ENOUGH MEMORY  to  execute  other  commands.
  2519.  The size program you can run depends on the amount of memory you have
  2520.  left.  The commands are passed to COMMAND.COM and  executed  if  room
  2521.  enough exists to do so.  The graphics tasks are designed to be invok-
  2522.  able this way.  
  2523.  
  2524.                       Interactive Calculator Mode
  2525.  
  2526.       DROPPING INTO INTERACTIVE CALCULATOR
  2527.  
  2528.        K       Drop into interactive Calculator
  2529.  
  2530.  
  2531.       The  K command gets you into Calc, described below, and lets you
  2532.  do computations.  When you give the interactive Calc program  the  *E
  2533.  command  to  exit, you return to the spreadsheet.  This may be useful
  2534.  where you want to do auxiliary computations not in the  spread  sheet
  2535.  or  try  out formulas that you may want to debug interactively before
  2536.  entering them onto the sheet.  This calculator  knows  decimal,  hex,
  2537.  and  octal  radices  and  can be used to debug indirect command files
  2538.  written for use within spreadsheet cells;  the *V 3  command  can  be
  2539.  given  and  then  the  *@file  can be given in Calc mode, providing a
  2540.  trace playback of the actions of a command file to see what it is do-
  2541.  ing.  
  2542.  
  2543.  
  2544.  
  2545. AnalytiCalc Reference Manual                                   Page 51
  2546.  
  2547.  
  2548.  
  2549.                  Conditional Restart of Command Files
  2550.  
  2551.          LOOPING COMMAND FILES
  2552.  
  2553.       _<        Rewind the current AnalytiCalc input file
  2554.  
  2555.  
  2556.       This  command  will  allow a command file to restart itself from
  2557.  the beginning.  It does so only if the % variable is  positive  (per-
  2558.  mitting  some control over it).  A command file may use the TEst com-
  2559.  mand to set the % variable prior to this command.  
  2560.  
  2561.       An  <  found  in  a cell equation causes the cell equation to be
  2562.  re-evaluated from the start of the formula, PROVIDED that the "<"  is
  2563.  seen  at the start of one of the cell's equations, AND that the % ac-
  2564.  cumulator is greater than 0.0 at that time.  This is provided to  al-
  2565.  low   use  in  conjunction  with  *WF,  *P,  and  *U  XQTCM  so  that
  2566.  multi-equation formulas can loop, doing jobs like selecting rows from
  2567.  regions,  entering sequences of numbers, and the like.  This provides
  2568.  a compact and fast looping structure that does not depend on  rewind-
  2569.  ing files externally.  The *U XQTCM TE {V1 construct is not supported
  2570.  however.  The looping is limited to at most 100 passes to prevent in-
  2571.  finite loops.  
  2572.  
  2573.  
  2574.                            COMMENT commands
  2575.  
  2576.          COMMENTS
  2577.  
  2578.          * any text
  2579.  
  2580.       Any line beginning with * is treated by AnalytiCalc as a comment
  2581.  (except when in the *F mode when it is sought).  This allows  you  to
  2582.  comment your indirect AnalytiCalc command files.  
  2583.  
  2584.  
  2585.  
  2586. AnalytiCalc Reference Manual                                   Page 52
  2587.  
  2588.  
  2589.  
  2590.              Prompting for Data to be EDited into formulas
  2591.  
  2592.          READING ARGUMENTS OFF CONSOLE
  2593.  
  2594.          - Prompt
  2595.  
  2596.       The  "-"  command  will  print the prompt text on the screen and
  2597.  await entry of a line of text.  This text is stored as up to 4  argu-
  2598.  ments for possible later use in EDit commands.  Spaces separate input
  2599.  arguments, and no argument may be longer than  51  characters.   This
  2600.  facility  is  intended  for use with indirect command files (@ files)
  2601.  which may want to be able to prompt for parts of  formulas  and  then
  2602.  edit  them  into the command formulas for use, or to prompt for parts
  2603.  of later-used Calc commands.  Note that Calc never sees any  formulas
  2604.  that  are given the A format, so they can be prepared in this way, to
  2605.  be used when they are given a numeric format.  
  2606.       A suitable - command might be 
  2607.  
  2608.  -Enter net pay> 
  2609.       which would produce the printout (in row 23 of the screen) 
  2610.  Enter net pay> 
  2611.       and  to which one might reply with a number to be entered onto a
  2612.  "template" worksheet.  
  2613.  
  2614.  
  2615.                            Application Notes
  2616.  
  2617.  
  2618.       In  entering  numbers, use a decimal (.) to get them to go in as
  2619.  floating point.  If numbers are entered with no  decimals,  they  are
  2620.  considered  integers.  The system will convert the values to floating
  2621.  point for storage, but incorrect results have occurred where  formula
  2622.  ranges have been mixed since multi-argument functions assume the con-
  2623.  versions are all alike in their ranges, and  binary  formats  of  in-
  2624.  tegers and floating point numbers differ greatly.  
  2625.  
  2626.       Note that the default format for numeric output is F9.2 and that
  2627.  it may be changed if desired.  If you set up the format  of  a  cell,
  2628.  that  marks  the  cell  valid  and the format is not altered by input
  2629.  defaults, nor the numeric/text interpretation of the cell.  To put in
  2630.  a  lot  of  labels, then, set up format A using DF and then enter the
  2631.  labels.  
  2632.  
  2633.       If  the sheet's calculations contain forward references (down or
  2634.  right), you may need to give the R (Recalculate) command a few  times
  2635.  to  get  proper values.  If the values on the sheet do not stabilize,
  2636.  you probably have a circular reference in your  formulas  and  should
  2637.  examine  the cells that do not stabilize for the circularity.  Calcu-
  2638.  lation is done across first (along rows first).  This allows any file
  2639.  references to be as nearly sequential as possible.  
  2640.  
  2641. AnalytiCalc Reference Manual                                   Page 53
  2642.  
  2643.  
  2644.  
  2645.       If  you enter numbers with exponentials, use +/- in front of the
  2646.  E so that AnalytiCalc can tell that the "E4" type strings in  numbers
  2647.  like "1.3E4" are really exponents, not cell names.  That is, 
  2648.       Don't enter 
  2649.          1.35E4 
  2650.       Enter 
  2651.          1.35E+4 
  2652.  to  avoid  confusion  when  cells are relocated.  Filenames that look
  2653.  like cell names should be avoided too.  That is, a  sheet  that  con-
  2654.  tains a formula like 
  2655.  @D5.FRM 
  2656.  might, upon getting moved from D5 to F3, be changed to 
  2657.  @F3.FRM 
  2658.  and IF this is not what is desired, it could cause confusion.  
  2659.  
  2660.  Note  that column widths on the display are properties of the DISPLAY
  2661.  columns, not the PHYSICAL columns.  This  arises  because  a  display
  2662.  column  may  cover  potentially  20 different physical columns on the
  2663.  sheet due to mapping.  That is, column 3 may have cells from column C
  2664.  of the physical sheet, but can be set to have cells also from columns
  2665.  R, AZ, Q, and W (for example), with  different  display  formats  for
  2666.  each.   Rather  than  choosing  some width a function of the physical
  2667.  columns which could cause confusion, the width is  up  to  you.   The
  2668.  columns  are  labelled  with the physical cell column of the adjacent
  2669.  cell in the top row and also with the display column number  to  make
  2670.  it  easier  to enter DL commands, which use display coordinates (pure
  2671.  numeric, column:row) rather than physical coordinates  (alphanumeric,
  2672.  e.g.  AK15).  
  2673.  
  2674.                     Interactive Calculator Section
  2675.            THE CALC MODE OPTION (K) and Functions Available:
  2676.  
  2677.       This  describes the CALC option (K) of AnalytiCalc which is also
  2678.  the mathematical engine used for  expression  evaluation  except  for
  2679.  multi-argument functions and IF statements.  
  2680.  
  2681.       NOTE:  
  2682.  
  2683.       You will need to use the command 
  2684.  
  2685.       *V 3 
  2686.  
  2687.  to  get  any numbers displayed initially;  AnalytiCalc initially sets
  2688.  the display View flag to zero for speed reasons.  
  2689.  
  2690.                                OVERVIEW
  2691.  
  2692.       CALC  mode  is  a calculator designed to evaluate arithmetic ex-
  2693.  pressions.  In its basic form, expression evaluation  is  similar  to
  2694.  that  used  by  ANSI FORTRAN with calculations performed on INTEGER*4
  2695.  
  2696. AnalytiCalc Reference Manual                                   Page 54
  2697.  
  2698.  
  2699.  
  2700.  and REAL*8 constants.  Variables may also be invoked.   Standard  al-
  2701.  gebraic  operator  precedence is used, and accumulators (A through Z,
  2702.  %, and all spreadsheet cells) may be assigned values by  Calc  state-
  2703.  ments of the form:  
  2704.  
  2705.       Accumulator=expression 
  2706.  
  2707.       Additional  features  include  octal  and hexadecimal arithmetic
  2708.  capabilities.  Commonly used commands and expressions can  be  placed
  2709.  in a file and executed when convenient.  
  2710.  
  2711.                         How to Enter CALC mode
  2712.  
  2713.       To enter Calc, use the K command of AnalytiCalc.  Calc mode will
  2714.  prompt as follows:  
  2715.  
  2716.         CALC> 
  2717.  
  2718.  Before starting in this mode, type the command 
  2719.  
  2720.       *V 3 
  2721.  
  2722.       to get the interactive portion to display results.  Now try typ-
  2723.  ing 
  2724.  
  2725.         123+456 
  2726.  
  2727.  followed by a carriage return.  CALC will evaluate the expression and
  2728.  output the answer 
  2729.         579 
  2730.  
  2731.  It then prompts for further input.  Try other expressions such as 
  2732.      12.0 - 99.               (answer=-87.00000000000000)
  2733.      -(-32767+(6-2)**8-(512/(409-401)))   (answer=-32705)
  2734.      3*5/7                                     (answer=2)
  2735.      3*(5/7)                                   (answer=0)
  2736.  
  2737.       Mixed mode is legal, for example 
  2738.  
  2739.         1977/50.  is evaluated as 39.54000000000000 
  2740.  
  2741.  
  2742.  Reals may be expressed using D or E format.  For example 
  2743.  
  2744.         1.2E10*2.D0**3-1.D-8 is evaluated as 
  2745.  
  2746.         0.95999999999999992D+11 
  2747.  
  2748.                              Accumulators
  2749.  
  2750.  
  2751. AnalytiCalc Reference Manual                                   Page 55
  2752.  
  2753.  
  2754.  
  2755.       Variables  may  also  be  used  to  retain values for later use.
  2756.  Variables may be the letters A through Z, or any AnalytiCalc physical
  2757.  sheet cell name.  All accumulators default to REAL type.  To set I to
  2758.  a value use the usual FORTRAN syntax, for example:  
  2759.  
  2760.         I=2**10-1 
  2761.  
  2762.  Try  typing  the  single  character  'I'.  CALC will respond with its
  2763.  value.  We can now use I in various expressions such as 
  2764.  
  2765.         J=I-I/3*3 
  2766.  
  2767.       %  is  a special variable that retains the value of the last ex-
  2768.  pression evaluated.  For example, to successively add up the  numbers
  2769.  1, 2, 3, 4, 5, and 6 we could enter 
  2770.  
  2771.        1
  2772.        %+2
  2773.        %+3
  2774.        %+4
  2775.        %+5
  2776.        %+6
  2777.  
  2778.       Note  that  you can examine the value of the variables by typing
  2779.  the appropriate single character followed by a carriage return.  Such
  2780.  an examination does not change the value of %.  
  2781.  
  2782.                     Getting Back to the Spreadsheet
  2783.  
  2784.       To exit from CALC, type 
  2785.  
  2786.         *E (or *EXIT) 
  2787.      or *S (or *STOP) 
  2788.  
  2789.  This will return you to AnalytiCalc.  (To exit AnalytiCalc, use the X
  2790.  command.) 
  2791.  
  2792.             Mathematical Functions for Calc and AnalytiCalc
  2793.                           -SPECIAL FUNCTIONS-
  2794.  
  2795.       CALC recognizes a variety of special functions.  For example, to
  2796.  calculate the square root of 2, we can type 
  2797.  
  2798.         SQRT(2.) 
  2799.  
  2800.  CALC responds with the value 1.41421356237310 
  2801.  
  2802.       Each  function may have an expression for its argument.  For ex-
  2803.  ample, 
  2804.  
  2805.  
  2806. AnalytiCalc Reference Manual                                   Page 56
  2807.  
  2808.  
  2809.  
  2810.       A=2.0*SQRT(ALOG(9.)+3.) 
  2811.  
  2812.  sets A to 4.55948443459838 
  2813.  
  2814.       The following special functions are available:  
  2815.  
  2816.   FUNCT NAME   ARG TYPE    FUNCT VALUE   DESCRIPTION
  2817.   -------------------------------------------------------
  2818.   ABS          REAL        REAL         absolute value
  2819.   DABS         REAL        REAL         absolute value
  2820.   IABS         INTEGER     INTEGER      absolute value
  2821.   IFIX         REAL        INTEGER      REAL to INT conv.
  2822.   AINT         REAL        REAL         REAL truncation
  2823.   INT          REAL        INTEGER      REAL to INT conv.
  2824.   IDINT        REAL        INTEGER      REAL to INT conv.
  2825.   EXP          REAL        REAL         e**X
  2826.   DEXP         REAL        REAL         e**X
  2827.   ALOG         REAL        REAL         natural logarithm
  2828.   DLOG         REAL        REAL         natural logarithm
  2829.   ALOG10       REAL        REAL         logarithm base 10
  2830.   DLOG10       REAL        REAL         logarithm base 10
  2831.   SQRT         REAL        REAL         square root
  2832.   DSQRT        REAL        REAL         square root
  2833.   SIN          REAL        REAL         trigonometric sine
  2834.   DSIN         REAL        REAL         trigonometric sine
  2835.   COS          REAL        REAL         trig. cosine
  2836.   DCOS         REAL        REAL         trig. cosine
  2837.   TANH         REAL        REAL         hyperbolic tangent
  2838.   DTANH        REAL        REAL         hyperbolic tangent
  2839.   ATAN         REAL        REAL         arc tangent
  2840.   DATAN        REAL        REAL         arc tangent
  2841.  
  2842.  
  2843.       Note  that  the  multi  argument  functions  (e.g.   SUM[range],
  2844.  AVG[range], etc., are all also available in CALC mode with  the  same
  2845.  restrictions  mentioned above.  The IF [expression]yes-expr|else-expr
  2846.  command is however NOT available in CALC mode;  use the *J expression
  2847.  instead (see below).  
  2848.  
  2849.                   -WORKING IN OCTAL AND HEXADECIMAL-
  2850.  
  2851.       You  may  change the base used to specify constants by using the
  2852.  *B command.  Legal forms are 
  2853.  
  2854.       command              action
  2855.       -------              ------
  2856.         *B             displays current default base
  2857.         *B 8           changes default base to octal
  2858.         *B 10          changes default base to 10
  2859.         *B 16          changes default base to 16
  2860.  
  2861. AnalytiCalc Reference Manual                                   Page 57
  2862.  
  2863.  
  2864.  
  2865.       Suppose we have changed the default base to octal.  Then adding 
  2866.  
  2867.         7 + 1 
  2868.  
  2869.  we obtain the result 
  2870.  
  2871.         00000000010 (BASE 8) 
  2872.  
  2873.  If the default base is hexadecimal, we can enter 
  2874.  
  2875.         9 + 1 
  2876.  
  2877.  which is evaluated as 
  2878.  
  2879.         0000000A (BASE 16) 
  2880.  
  2881.  Suppose we have assigned 
  2882.         A=1 
  2883.  then 
  2884.         1+A 
  2885.  gives 
  2886.         2.000000000000000 
  2887.  
  2888.  even  when the default base is 16.  If we wish to add the hexadecimal
  2889.  digit 'A' to 1, enter 
  2890.  
  2891.         1+0A 
  2892.  
  2893.  We now obtain the desired 
  2894.  
  2895.         0000000B (BASE 16) 
  2896.  
  2897.       This  leading  0  is  only  necessary when the first hexadecimal
  2898.  digit is greater than 9.  
  2899.  
  2900.       If  constants are entered with digits that are not legal for the
  2901.  base being  used,  the  entire  number  is  converted  using  a  more
  2902.  appropriate  base.   For  example, if we have set the default base to
  2903.  octal and type 
  2904.         1+9 
  2905.  
  2906.       the  9 is not an octal number so it is converted to base 10.  If
  2907.  a base 16 number is involved, the result will be in base 16.  
  2908.  
  2909.       You  may  temporarily  change the base for a single integer con-
  2910.  stant by preceeding it with 
  2911.  
  2912.         ^8 for octal 
  2913.         ^10 for base 10 
  2914.         ^16 for base 16 
  2915.  
  2916. AnalytiCalc Reference Manual                                   Page 58
  2917.  
  2918.  
  2919.  
  2920.  
  2921.  For example, if the default base is 10, 
  2922.         100+^840 
  2923.  gives 
  2924.         132 
  2925.  
  2926.  a base 10 integer.  
  2927.  
  2928.         I=100+^1610 
  2929.  
  2930.  gives 
  2931.         116 
  2932.  
  2933.  also a base 10 integer.  
  2934.  
  2935.       Note  that  the '^' can only be used to specify the base of con-
  2936.  stants and that expressions such as ^16I are illegal.  
  2937.  
  2938.       To  declare  variables to be integers of a specific base, we can
  2939.  use the commands 
  2940.     *INTEGER        (base 10)
  2941.     *OCTAL          (base 8)
  2942.     *HEX            (base 16)
  2943.  for example, 
  2944.     *INTEGER A     declares variable A to be a
  2945.                    base 10 integer.
  2946.     *HEX B,Z,F     declares variables B, Z, and
  2947.                    F to be base 16 integers.
  2948.     *DECIMAL       lists all the variables that
  2949.                    have been declared to be
  2950.                    of type DECIMAL.
  2951.  
  2952.  
  2953.       To  summarize,  there  are  three  distinct  ways of making base
  2954.  declarations when using CALC.  The first is to use the *B command  to
  2955.  designate the base default value.  This is used to determine the base
  2956.  for constants when they occur in expressions.  It does not in any way
  2957.  influence the type of any variables found in an expression.  The only
  2958.  way to change the type of a variable is with a specific CALC  command
  2959.  such as 
  2960.         *INTEGER A,B 
  2961.  
  2962.       Note  that  the  *INTEGER  command  can be used to set types for
  2963.  AnalytiCalc cells.  However, exercise care in doing so that your dis-
  2964.  play formats match the new type.  
  2965.  Suppose for example that the default base is 10 and we enter 
  2966.         *OCTAL A 
  2967.         A=100 
  2968.  
  2969.  then CALC responds with 
  2970.  
  2971. AnalytiCalc Reference Manual                                   Page 59
  2972.  
  2973.  
  2974.  
  2975.         00000000144 (BASE 8) 
  2976.  
  2977.       Finally,  the  last  way to change a base is to use the explicit
  2978.  base specifiers for a constant, for example 
  2979.  
  2980.       ^10 123 
  2981.       ^8 777 
  2982.       ^16 AB 
  2983.  
  2984.                  Commands and Other Functions for Calc
  2985.                             and AnalytiCalc
  2986.  
  2987.       All  commands  to  CALC (as distinguished from expressions to be
  2988.  evaluated) begin with an asterisk.  To obtain a list of all  possible
  2989.  commands,  type  a question mark followed by a carriage return.  Most
  2990.  of the commands have already been described.  The  following  section
  2991.  gives  an  explanation of the remaining commands.  Many of these have
  2992.  the role of functions too, and may change the value of % or other ac-
  2993.  cumulators.  
  2994.  
  2995.      COMMAND            DESCRIPTION
  2996.      -------            -----------
  2997.   *@filename      Where  filename  is  the name of a file of CALC com-
  2998.                mands.  CALC reads the file and executes the  commands.
  2999.                Up  to 5 nested calls can be made.  Recursive calls are
  3000.                not allowed.  CALC prompts  with  CALC<n>  before  each
  3001.                command line is executed, where n is the calling level.
  3002.                You may optionally follow the file name  with  a  blank
  3003.                followed by a single variable name (a single alphabetic
  3004.                character or %).  CALC will then execute the file until
  3005.                the  value  of  that variable is zero or negative.  The
  3006.                test of this variable is made before the file  is  exe-
  3007.                cuted  and  not during execution of commands within the
  3008.                file.  If the variable's value is not positive when the
  3009.                command  is initially encountered, the file will not be
  3010.                opened for execution.   This  facility  allows  any  or
  3011.                every  cell  to  be  driven  by  command files while in
  3012.                spreadsheet mode.  
  3013.   *ASCII     Declares a list of variables to be of type ASCII.  Useful
  3014.                when decoding ASCII characters.  For example, if we set
  3015.                A  to be of type ASCII, then typing A=77 results in the
  3016.                character 'M' being output.  The inverse  operation  is
  3017.                the  single  quote.   It  allows us to specify a single
  3018.                ASCII constant.  For example, if we type 
  3019.                'M 
  3020.                then  the  character 'M' is echoed and indicates that %
  3021.                holds that character and has data type ASCII.   Suppose
  3022.                that the variable I has data type INTEGER.  Then we can
  3023.                output the base 10 code for the ASCII character 'M'  by
  3024.                entering 
  3025.  
  3026. AnalytiCalc Reference Manual                                   Page 60
  3027.  
  3028.  
  3029.  
  3030.                I='M 
  3031.                which  results in 77 being output.  Notice that you may
  3032.                not be able to enter certain  control  characters  that
  3033.                are  intercepted  by your operating system.  Characters
  3034.                whose value is less than 32.  are  output  by  printing
  3035.                the  character  '^'  followed  by  the equivalent ASCII
  3036.                character of that number plus 32.  For example, 
  3037.                A=10 
  3038.                results in 
  3039.                ^* 
  3040.                being  output  since  42  is  the  ASCII  code  for the
  3041.                character '*'.  See Appendix  A  for  a  table  of  the
  3042.                characters   output   by   CALC   to   represent   such
  3043.                non-printable characters.  
  3044.   *C      COMMENT  line.   The  characters  that follow are ignored by
  3045.                CALC.  This is useful when documenting files containing
  3046.                CALC commands.  
  3047.   *N      NOVIEW.   Prevents CALC from outputting the value of the ex-
  3048.                pressions evaluated.  This is  especially  useful  when
  3049.                executing  files containing CALC commands that initial-
  3050.                ize variables to special values.  Equivalent to *V 1 
  3051.   *V     VIEW.  Controls CALC's printing options:  
  3052.  
  3053.                  command    output class
  3054.                  --------   --------------
  3055.                   *V 0       error messages
  3056.                
  3057.                   *V 1       error messages
  3058.                              command lines read
  3059.                                from files
  3060.                
  3061.                   *V 2       error messages
  3062.                              value of expressions
  3063.                                evaluated
  3064.                
  3065.                   *V 3       error messages
  3066.                              command lines read
  3067.                                from a file
  3068.                              value of expressions
  3069.                                evaluated
  3070.                   *V         same as *V 3
  3071.  
  3072.                The  default  setting is *V 0.  Notice that other legal
  3073.                forms are *VIEW 1 and *V2.  You may want to  include  a
  3074.                command  *V  0 somewhere before using any command files
  3075.                to avoid diagnostic printouts if you use indirect  cell
  3076.                files much.  
  3077.   *R      READ.   Allows  a  single line to be read from the terminal.
  3078.                Useful in files of CALC commands  to  allow  additional
  3079.                commands to be entered (like *S to exit from that file)
  3080.  
  3081. AnalytiCalc Reference Manual                                   Page 61
  3082.  
  3083.  
  3084.  
  3085.                or simply as a way to halt terminal  output  until  the
  3086.                carriage return key is pressed.  
  3087.   *REAL     declares specified variables to be REAL*8.  When the value
  3088.                of such variables are output,  FORTRAN's  D  format  is
  3089.                used.  
  3090.   *DECIMAL      Declares  specified  variables to be REAL*8.  When the
  3091.                value of such variables are output, FORTRAN's F  format
  3092.                is  used.   Variables  A-H  and  O-Z  default  to  type
  3093.                DECIMAL.  
  3094.   *S     STOP.  Same as *E 
  3095.   *E      EXIT.   Terminates  CALC  session unless it is used within a
  3096.                file of CALC commands.  In this case, CALC  closes  the
  3097.                file and continues with the next command.  
  3098.   *Z      ZERO.   Zeroes  all  variables except %.  Data types are not
  3099.                changed.  
  3100.   *G        *G  V1,V2  (where V1 and V2 are cell or accumulator names)
  3101.                will evaluate V1 and V2 as the column and row  numbers,
  3102.                on  the  physical  sheet, of the desired cell.  The ad-
  3103.                dressed cell's value  is  retrieved  and  used  as  the
  3104.                resulting number.  This is used for lookup tables.  
  3105.   *W        Takes  the  value at the current cell and writes it out to
  3106.                the formula as a numeric (floating) value.  The current
  3107.                cell  may have been modified temporarily by the *P com-
  3108.                mand.  This will overwrite the formula  at  that  cell.
  3109.                The  *WF  command  will work the same as *W except that
  3110.                the format used for rewriting the number  will  be  the
  3111.                current  cell's  display  format instead of a pre-fixed
  3112.                D32.25 format.  Some extra  spaces  may  be  introduced
  3113.                which  may  be  removed by the command "ED / //".  This
  3114.                allows  freezing  values  to  whatever   precision   is
  3115.                desired.  
  3116.   *P        The  *P  command  resets  the current cell coordinate from
  3117.                within a cell (until the next cell is evaluated  only).
  3118.                It has several forms:  
  3119.              *P - By itself, *P causes Calc to prompt for the new phy-
  3120.                sical column and row number.  
  3121.              *P V1 - This moves the current location to the named cell
  3122.                where V1 is the cell name (e.g.  A5, H2) 
  3123.              *P@  V1,V2  -  This uses V1 and V2 (cell names) as column
  3124.                and row numbers and changes the current  physical  cell
  3125.                position  to  that  defined by the contents of cells V1
  3126.                and V2.  This gives complete addressing  of  the  sheet
  3127.                from within any cell.  
  3128.   *F         *F Label - If the value in % is positive and nonzero this
  3129.                command rewinds the input file for  the  AnalytiCalc  @
  3130.                command  (not  the  Calc  @  command)  and seeks a line
  3131.                beginning with the characters *CLabel (where "label" is
  3132.                what  you  put after the *F command).  This allows Calc
  3133.                commands inside a cell to direct outside command entry. 
  3134.   *J         *J  Label  -  This  command behaves as the *F command but
  3135.  
  3136. AnalytiCalc Reference Manual                                   Page 62
  3137.  
  3138.  
  3139.  
  3140.                operates on the file used by the Calc @ command  rather
  3141.                than  the  AnalytiCalc  one.   Thus, conditions in Calc
  3142.                program files may be implemented.  
  3143.  
  3144.                Data File Access 
  3145.  
  3146.   *QF 
  3147.   *QW         The  *QF  (Float)  or  *QW  (write) commands are used to
  3148.                examine sequential files  created  outside  AnalytiCalc
  3149.                and return values or formulas.  Their syntax is 
  3150.            *QF filename ?key1?  ?key2?  <lm> 
  3151.         or *QW filename ?key1?  ?key2?  <lm> 
  3152.                where ?key2?  is optional 
  3153.                l  and  m are delimiter characters for start and end of
  3154.                the parts of the selected records to extract  (defaults
  3155.                to  first part of the record) filename is just the file
  3156.                specifier in the host OS.  operation is that  the  file
  3157.                is  searched  from the beginning for records containing
  3158.                key1 (and key2 if specified) and then the part  of  the
  3159.                record  between  character l and character m (delimiter
  3160.                characters, which may be the same as for example 2 com-
  3161.                mas) is extracted.  That part of the record is then ei-
  3162.                ther Floated by converting to a floating  point  number
  3163.                using  a  wide Floating Point format specifier (in *QF)
  3164.                or read in and made the current cell's formula  between
  3165.                those delimiters (in the case of *QW).  Records may not
  3166.                be over 128 characters long.   This  command  would  be
  3167.                used to extract data from a database or word processing
  3168.                files.  
  3169.  
  3170.                     The  first key will begin at the start of the line
  3171.                for each file if it's first character is the `  (accent
  3172.                grave)  character.  Then the key searched for is sought
  3173.                always at the start of the line, minus the ` character. 
  3174.  
  3175.                     The delimiters may contain 3 characters to specify
  3176.                positional fields.  In this case, the  first  delimiter
  3177.                character  is  `  (again)  and the second 2 are encoded
  3178.                start location and length fields.  They  are  just  the
  3179.                binary  values  of these + 32 (starting from 1) to turn
  3180.                them to printable ASCII.  
  3181.  
  3182.                     Variant  forms are *QFK, *QWK (which keep the file
  3183.                open after opening it so that subsequent *QFN  or  *QWN
  3184.                or *QFC or *QWC commands can read sequentially down the
  3185.                file), or the mentioned *QFN and *QWN  commands,  which
  3186.                read the file from the Next record (leaving it open for
  3187.                more Next searches) and the *QFC or *QWC variants which
  3188.                perform  the  *QFN  type  action  but close the file on
  3189.                completion.  The file spec must  be  present  in  *QFN,
  3190.  
  3191. AnalytiCalc Reference Manual                                   Page 63
  3192.  
  3193.  
  3194.  
  3195.                *QWN,  *QFC,  and  *QWC commands, but is ignored there.
  3196.                If the search fails, the % accumulator is  returned  as
  3197.                -999999.   and on *QW type operations where there is no
  3198.                failure, the % accumulator returns a value  of  1.0  to
  3199.                indicate  success.   In the *QF commands, the value re-
  3200.                turned is in the file searched.   These  return  values
  3201.                occur  regardless  of  the variant.  Note that the same
  3202.                logical unit (4) is used for all *Q  class  operations,
  3203.                so  a subsequent *QF or *QW will close the unit after a
  3204.                string of *QN searches of indeterminate length.  A  re-
  3205.                quest  that searches the null device is a simple way to
  3206.                ensure the unit is closed.  It is possible to leave  it
  3207.                open  and  interfere with some other operations, so the
  3208.                user is cautioned to pay attention to  this  aspect  of
  3209.                program operation when designing a sheet that uses it. 
  3210.   *U  funct args      The *U command is a means to allow easy user ad-
  3211.                dition to  the  AnalytiCalc  function  repertoire.   It
  3212.                passes  the command line to the USRFCT subroutine which
  3213.                is set up to recognize up to  5-letter  function  names
  3214.                (edit it to add what you need) and to process the func-
  3215.                tions called.  The parsing is up to you.  Note that the
  3216.                VARSCN  routine may be called to convert variable names
  3217.                into coordinates in the XVBLS array.  
  3218.  
  3219.                     Functions supplied include:  
  3220.           DATE  functions  operating  on  dates:  IDATE, YRMOD, JDATE,
  3221.                JTOCH, and DATE which all  return  or  convert  between
  3222.                Julian   dates   (day   since   a   fixed   date)   and
  3223.                year/month/day binary, and ASCII dates.  
  3224.           MATRIX  functions  which  handle matrix math:  MTXEQ, MOVEV,
  3225.                MDET, MPROD, MADDV, MSUBV,  MMPYT,  and  MMPYC.   These
  3226.                handle all variants of normal matrix algebra.  MMPYT is
  3227.                particularly handy for producing the dot product  of  2
  3228.                rows  or columns (sum of products of corresponding ele-
  3229.                ments).  Note that matrix math works only in the  prime
  3230.                area  however.  That is, matrices must reside above and
  3231.                to the left of cell BI301 (so the legal range  for  ma-
  3232.                trices is A1 through BH300).  
  3233.           EQUATION  SOLUTION via the VARY function, which allows up to
  3234.                8 accumulators to vary to iteratively search for  solu-
  3235.                tions to equations anywhere on the sheet.  
  3236.           UTILITY  functions,  including STRVL, which converts formula
  3237.                text to numeric values, XQTCM which  executes  commands
  3238.                from  inside  formulas,  and HERE which returns current
  3239.                location and some extra sheet status information.  
  3240.  
  3241.  
  3242.                DETAILS:  
  3243.  
  3244.  
  3245. AnalytiCalc Reference Manual                                   Page 64
  3246.  
  3247.  
  3248.  
  3249.                     A version of USRFCT is supplied which can call the
  3250.                system to return the system month, day, and year in ac-
  3251.                cumulators  T,  U,  and  V respectively.  The % returns
  3252.                with a value of yymmdd to permit  easier  sorting  too.
  3253.                However, any functions desired may be added in this way
  3254.                and results extracted in whatever  way  is  convenient.
  3255.                The  yymmdd  value  returned  is a Julian date based on
  3256.                1/1/1980, in the % accumulator.  This  is  the  IDATE()
  3257.                function.  
  3258.  
  3259.                     There  are 4 other date functions supported in the
  3260.                most capable  AnalytiCalcs.   These  permit  conversion
  3261.                between  ASCII  dates  displayed as YY/MM/DD and Julian
  3262.                dates, or back.  
  3263.  
  3264.                     The call 
  3265.  
  3266.                *U YRMOD VY,VM,VD 
  3267.  
  3268.                returns  the  Julian date (in %) computed from the Year
  3269.                (in VY), the month (in VM) and the day (in  VD),  where
  3270.                VY,  VM,  and  VD  are  sheet  cells.  These may be the
  3271.                result of date arithmetic.  
  3272.  
  3273.                     The call 
  3274.  
  3275.                *U JDATE Var 
  3276.  
  3277.                assumes  the  formula in cell Var (any spreadsheet cell
  3278.                name) contains a date string in  the  format  YY/MM/DD.
  3279.                It reads this formula and converts the date to a Julian
  3280.                date, returning it in the % accumulator.  
  3281.  
  3282.                     The call 
  3283.  
  3284.                *U JTOCH Jul,Var 
  3285.  
  3286.                assumes  that  variable Jul (any spreadsheet cell) con-
  3287.                tains a Julian date and changes it into an ASCII string
  3288.                in  the  cell  whose  name is in the Var position here.
  3289.                This wipes out  any  previous  formula  in  that  cell,
  3290.                though  it does not alter display format or type infor-
  3291.                mation.  The T, U, and V accumulators return  with  the
  3292.                month, day, and year on return.  
  3293.  
  3294.                     The call 
  3295.  
  3296.                *U DATE VY,VM,VD,Var 
  3297.  
  3298.                uses  VY,  VM,  and  VD  as  year,  month  and day, and
  3299.  
  3300. AnalytiCalc Reference Manual                                   Page 65
  3301.  
  3302.  
  3303.  
  3304.                computes a Julian date from them.  It then composes  an
  3305.                ASCII  string of form YY/MM/DD for that date and stores
  3306.                in the formula for Var.  
  3307.  
  3308.                     The  use  of Julian dates is made because the dif-
  3309.                ference of two Julian dates is precisely the number  of
  3310.                days  between  the  two  dates.   These  functions  are
  3311.                designed to make date labels easier to do.  
  3312.  
  3313.                     There  are  actually  4  supplied USRFCT routines.
  3314.                The larger of these are also able to solve matrix equa-
  3315.                tions  (this demonstrates how other programs may be in-
  3316.                tegrated with the package).  The  function  solves  the
  3317.                matrix  equation  AX=B where A is a square matrix and X
  3318.                and B are rectangular ones, A being n by n and X, B be-
  3319.                ing n by m.  
  3320.  
  3321.                     The call formats for IDATE and MTXEQU are 
  3322.  
  3323.                *U IDATE() 
  3324.  
  3325.                *U MTXEQ(AA:AA,XX:XX,BB:BB) 
  3326.  
  3327.                where  the  notation AA:AA means two cells at the upper
  3328.                left and lower right edges of matrix A (e.g.  B2:C3 for
  3329.                the  2  X 2 matrix so defined), and the XX:XX and BB:BB
  3330.                notation means the same for the X and B matrices.  This
  3331.                capability  is  used  to solve systems of linear simul-
  3332.                taneous equations and does so with extreme speed.  Note
  3333.                however  that  errors  can  occur  if  the  A matrix is
  3334.                singular.   The  cell  returns  0  if  the  matrix  was
  3335.                singular  and  does  not solve the equation then;  1 is
  3336.                returned if the equation was solved.  
  3337.  
  3338.                     Note  that  matrix A is modified by the call, so a
  3339.                reasonable precaution is to ensure that the  matrix  is
  3340.                reset  by  AnalytiCalc prior to each computation.  This
  3341.                may be done by:  
  3342.            1.  Placing the MTXEQ call in a cell left and down from the
  3343.                A matrix and 
  3344.            2.   Ensuring there are some alphas in each entry in matrix
  3345.                A.  This may be done by placing a  \*C FRC RECALC  into
  3346.                each  cell.   This is a comment and will not affect the
  3347.                number.    However   because   it   contains    alphas,
  3348.                AnalytiCalc  will  then re-compute each number whenever
  3349.                the sheet is computed.  
  3350.  
  3351.                     or 
  3352.  
  3353.  
  3354. AnalytiCalc Reference Manual                                   Page 66
  3355.  
  3356.  
  3357.  
  3358.                     Using the MOVEV function to copy the real A matrix
  3359.                onto the working one before the MTXEQU call every time.
  3360.                (This  is  the efficient way to do it, as recalculating
  3361.                the constants every time wastes resources.) 
  3362.  
  3363.                     To have the X matrix cells displayed without being
  3364.                modified, it is necessary to have the  cells'  formulas
  3365.                contain  a  self-reference.  The easiest way to achieve
  3366.                this is to place the "formula" P 0 0  into  each  cell.
  3367.                This  effectively will cause display of whatever number
  3368.                is there.  A similar technique may be used  to  set  up
  3369.                matrix A, where the real matrix is elsewhere and formu-
  3370.                las in A are just the P 0 0 type.  The real matrix  may
  3371.                contain  formulas  like  "34.65\D12=%"  to  set  up the
  3372.                desired contents here AND to reset  cell  D12  (in  the
  3373.                work  area)  to the entered value.  The B matrix is not
  3374.                modified by the MTXEQ routine.  A simpler way to handle
  3375.                the  problem  is  to  use the MOVEV function (below) to
  3376.                copy the desired cells  to  a  scratch  A  matrix  from
  3377.                wherever it was, so the scratch matrix may be destroyed
  3378.                without impact on display.  If this is done, the source
  3379.                of  the  A  matrix  need  not be specially bollixed up.
  3380.                Several additional functions exist in the  larger  ver-
  3381.                sions  of  USRFCT, the largest of which is designed for
  3382.                use with VAX due to space limitations on PDP11.  
  3383.  
  3384.                *U MOVEV mtxa,mtxb 
  3385.  
  3386.                where  mtxa  and mtxb are matrix specifiers.  This com-
  3387.                mand moves values from mtxa to mtxb  (useful  prior  to
  3388.                calling MTXEQ).  
  3389.  
  3390.                *U MDET mtx 
  3391.  
  3392.                This  function  computes and returns the determinant of
  3393.                matrix mtx (specified as v1:v2  where  v1  and  v2  are
  3394.                upper left and lower right corners of the matrix).  
  3395.  
  3396.                The  next  functions  are implemented in the largest of
  3397.                the USRFCT routines, and presently are limited  to  VAX
  3398.                implementations,  in  which they are present by default
  3399.                unless the build files are changed.  
  3400.  
  3401.                *U MPROD A,B,C 
  3402.  
  3403.                This function will multiply matrix A by matrix B giving
  3404.                matrix C, provided that their dimensions  are  compati-
  3405.                ble.   Note  this  and later functions may be available
  3406.                only on VAX versions of AnalytiCalc.  
  3407.  
  3408.  
  3409. AnalytiCalc Reference Manual                                   Page 67
  3410.  
  3411.  
  3412.  
  3413.                *U MADDV A,B,C 
  3414.  
  3415.                This  function  adds matrix A to matrix B and stores in
  3416.                matrix C.  All matrices must have the same  dimensions.
  3417.                It  can  be used for adding values in any pairs of rec-
  3418.                tangular regions much faster than a series of sum func-
  3419.                tions would permit.  
  3420.  
  3421.                *U MSUBV A,B,C 
  3422.  
  3423.                This  function subtracts matrix B from matrix A leaving
  3424.                the result in matrix C;  as  above,  matrix  dimensions
  3425.                must be the same.  It also is far faster in subtracting
  3426.                rectangular regions than  numerous  separate  equations
  3427.                would be.  
  3428.  
  3429.                *U MMPYT A,B,C 
  3430.  
  3431.                This function multiplies matrix A-transpose by matrix B
  3432.                and stores the result in matrix C;  dimensions must  be
  3433.                compatible.   Also,  as  in MPROD, matrix C must not be
  3434.                the same as either A or B.  In ordinary use,  this  can
  3435.                be  handy  for dot products.  That is, suppose you have
  3436.                two column parts, G10:G50 and R20:R60 and you  want  to
  3437.                form  the  sum  (G10*R20  +  G11*R21 + G12*R22 + ...  +
  3438.                G50*R60) for later use.  In many systems, you  need  to
  3439.                make another column of the G10*R20, etc.  terms and add
  3440.                it up.   Here,  you  can  use  the  MMPYT  function  as
  3441.                *U MMPYT G10:G50,R20:R60,G51:G51  to  form  the sum and
  3442.                store it in cell G51.  (It can be stored anywhere;  G51
  3443.                is chosen just for illustration.) If you have a row and
  3444.                a column to multiply, you use the  MPROD  function  in-
  3445.                stead  of  MMPYT  for  this.   Since this is a built in
  3446.                function, it can be orders of magnitude faster than the
  3447.                separate - column approach.  
  3448.  
  3449.                *U MMPYC A,B,K 
  3450.  
  3451.                This  function  multiplies every element of matrix A by
  3452.                constant K (a  cell  or  accumulator)  and  stores  the
  3453.                result  in  matrix B.  This function is FAR faster than
  3454.                separately multiplying many  cells.   If  you  want  to
  3455.                scale  a  rectangular  region of the sheet by some con-
  3456.                stant, this function can be used to quickly do so, mul-
  3457.                tiplying  each  cell  in  the region by the constant in
  3458.                cell or accumulator K (K can be ANY cell  or  accumula-
  3459.                tor).   Wherever  you need to adjust data by some frac-
  3460.                tion, this function should be used as the  fastest  way
  3461.                of doing it.  
  3462.  
  3463. AnalytiCalc Reference Manual                                   Page 68
  3464.  
  3465.  
  3466.  
  3467.  
  3468.  
  3469.                *U VARY X,A,W,I,P;Q;R;S;T;U;V;W 
  3470.  
  3471.                (Equation Solving by Iterative Search) 
  3472.  
  3473.                This   function  allows  AnalytiCalc  to  automatically
  3474.                search for solutions to equations over up to  8  dimen-
  3475.                sions.  The operation is that the accumulators named in
  3476.                the fields shown as P;Q;R;S;T;U;V;W (one to  8  may  be
  3477.                specified,  only one is required) are varied by a frac-
  3478.                tion W about their initial values (later scaled down by
  3479.                the  gradient of the change in X) to attempt to get ac-
  3480.                cumulator or cell X to equal  accumulator  or  cell  A.
  3481.                This  is  done for I iterations, where I is another ac-
  3482.                cumulator.  Care should be taken that I is not initial-
  3483.                ized  in  every pass of the spreadsheet, but at most 20
  3484.                iterations will be done in any one pass as a  safeguard
  3485.                in  any  case.  The accumulators given must be indepen-
  3486.                dent variables;  set dependent  ones  or  normalization
  3487.                conditions elsewhere on the sheet for use with calcula-
  3488.                tions.  Any function or set of functions can be entered
  3489.                and  the  program will step the accumulators to attempt
  3490.                to find a (local) minimum of the value of (X-A) where X
  3491.                and  A  may be either accumulators or cells.  The other
  3492.                arguments must be accumulators (i.e., named  A  through
  3493.                Z,  though  prior automatic use of X, Y, and Z may con-
  3494.                flict if these are used).   This  function  will  allow
  3495.                iterative  solutions  to  be  found  for situations not
  3496.                soluble  directly,  with  stops  for  inspection  every
  3497.                several  iterations.   The  TE command may be used con-
  3498.                veniently to set the accumulator designated as  I  here
  3499.                without need to modify a cell to do so.  
  3500.  
  3501.                     The  VARY function is initialized by a negative or
  3502.                0 value in the I accumulator (the LOGICAL  one,  not  I
  3503.                itself).   The  equations controlling the variation may
  3504.                appear anywhere in the sheet, and variation  begins  at
  3505.                the initial values set into the varying ACs (P-W in the
  3506.                illustration).  Both the logical X and  A  accumulators
  3507.                may vary, as well.  
  3508.  
  3509.                     As an example, let us suppose we want to solve the
  3510.                equation A=SQRT(B) for B, given  A.   Humans  would  of
  3511.                course  just  square  both  sides,  but in an iterative
  3512.                solution, we would vary B until we found A.  The method
  3513.                used here performs the variations intelligently so that
  3514.                we actually approach the correct value  asymptotically;
  3515.                the  signal  we  have  a solution is that the variation
  3516.                stops.  To set this up, we might  enter  the  following
  3517.  
  3518. AnalytiCalc Reference Manual                                   Page 69
  3519.  
  3520.  
  3521.  
  3522.                equations  in  a  row  or column (or anywhere actually;
  3523.                order doesn't matter) in the sheet:  
  3524.  
  3525.                I=-1.\A=55.\P=12.\*C Set up to initialize 
  3526.                            with negative I, initial guess 
  3527.                            12., and desired value 55.  
  3528.                W=1.\*C Set "step scale" 
  3529.                P+0.\*C Display P accumulator on screen 
  3530.                B=SQRT(P)\*C Enter equation relating B, P 
  3531.                *U VARY B,A,W,I,P 
  3532.  
  3533.                Now we go back to the first equation, since the desired
  3534.                value in A (55.) has been set and the initial guess for
  3535.                SQRT(55.) has been entered (12.) and we may now set the
  3536.                number of iterations desired to drive the  calculations
  3537.                to solve the equation 
  3538.                B=A (which amounts to B=55.) 
  3539.                (which is what the VARY function does), by varying P to
  3540.                control B.  The idea here is that we can control P, but
  3541.                B  is  an  ARBITRARY  function of P (and possibly other
  3542.                AC's) and we will vary the independent AC's like  P  to
  3543.                find  what  THEY  need  to  be to arrive at the desired
  3544.                dependent "goal" values.  Here we are solving  B=A,  or
  3545.                B=55., or SQRT(P)=55.  and finding P in this way.  
  3546.  
  3547.                     In the first equation we now enter 
  3548.  
  3549.                I=10.\*C Enter some number of iterations 
  3550.                          to search for between displays.  
  3551.  
  3552.                and  for  every display, we will see how P varies since
  3553.                we are displaying P in one of the cells.  It will  con-
  3554.                verge on the square root of 55.  (which is 7.416) after
  3555.                some iterations.  We may just use the  TE  command  in-
  3556.                stead  to  set  the  I accumulator to avoid some of the
  3557.                complexity of messing with cells on the sheet.  We then
  3558.                use  the R (Recalculate) command after the TEst command
  3559.                to cause the solving to begin.  
  3560.  
  3561.                     Note that we could have more than just accumulator
  3562.                P varying and could have much more  complex  functions.
  3563.                Also,  both A and B could be functions of any or all of
  3564.                these accumulators.  Matrix computations may  be  used,
  3565.                or   any   other   functions   available   through  the
  3566.                spreadsheet, and the equations may be entered  anywhere
  3567.                on  the  sheet.  In this way, some quite powerful sorts
  3568.                of solutions to equations may be found.  The philosophy
  3569.                of  this  is  that if you know enough algebra to set up
  3570.                the equations for a problem (the hard  part),  you  can
  3571.                set  them up so the spreadsheet can solve them directly
  3572.  
  3573. AnalytiCalc Reference Manual                                   Page 70
  3574.  
  3575.  
  3576.  
  3577.                yourself, if there is a simple way to do so.  If  there
  3578.                isn't,  and if you can express the desired result as an
  3579.                equation, the  AnalytiCalc  program  can  do  iterative
  3580.                searching to try and solve the problem for you, varying
  3581.                up to 8 accumulators to do so.  If you really  want  to
  3582.                search for a situation in which several cells are close
  3583.                to several others, just make up an additional cell that
  3584.                is  the  "summed distance" between the desired targets.
  3585.                For example, if you want to arrive at a solution  where
  3586.                cell  B20 should approach B30, D25 should approach D35,
  3587.                and cell X15 should  approach  cell  AQ5,  make  2  new
  3588.                cells.   One  should be zero, and the other will have a
  3589.                formula that looks like 
  3590.  
  3591.                (B20-B30)**2+(D25-D35)**2+(X15-AQ5)**2 
  3592.  
  3593.                or  a  simple  variation, perhaps using multiplying in-
  3594.                stead of **2 as was done here.  This will  produce  the
  3595.                desired results, PROVIDED that the cells depend somehow
  3596.                on the accumulator values you are varying.  
  3597.            There are 2 more functions for the USRFCT.F40 sources which
  3598.                permit access to formulae and allow more flexible  com-
  3599.                mand procedures.  
  3600.  
  3601.                     The  function  *U XQTCM command  will  execute the
  3602.                command (terminated by the end-of-line), with any  com-
  3603.                mand except X or K permitted, from inside a cell.  This
  3604.                allows command files driven from cells to control  mov-
  3605.                ing  data,  etc.  It is suggested that cells containing
  3606.                these references in command files have the last command
  3607.                in the file set the cell format to [A] so that the com-
  3608.                mand execution will be once only, unless repeated  com-
  3609.                mands are desired.  
  3610.  
  3611.                     The function "*U STRVL V1,start;len" will return a
  3612.                value that is made from up to 8 characters in the  FOR-
  3613.                MULA  of  cell V1 (where V1 is any cell name), starting
  3614.                at character "start" and  for  "len"  characters.   The
  3615.                value  is  computed  such  that a numeric sort on these
  3616.                values is equivalent to an alpha sort on the  formulas;
  3617.                the  characters are multiplied from the left by 128 and
  3618.                the next ASCII value is added.  This  function  may  be
  3619.                combined  with the DS commands to sort on text, or with
  3620.                the XQTCM functionality to  drive  a  slower  but  more
  3621.                thorough sort on values.  
  3622.  
  3623.                     The function "*U HERE" will return the current lo-
  3624.                cation  on  the  matrix.   The  normal  result   is   a
  3625.                hash-coded  address of the physical cell pointed to, in
  3626.                the  %  accumulator,  and  the  column   and   row   in
  3627.  
  3628. AnalytiCalc Reference Manual                                   Page 71
  3629.  
  3630.  
  3631.  
  3632.                accumulators  T  and U respectively.  The row number is
  3633.                up by 1 (as the X,Y accumulators are at start  of  cell
  3634.                evaluation)  to account for accumulator storage.  Also,
  3635.                the flags for manual display update and manual recalcu-
  3636.                late  are  returned  in accumulator V.  The 4 bit being
  3637.                set means manual view is set on, and the  2  bit  means
  3638.                manual recalculate is on.  The W and Y accumulators re-
  3639.                turn the current maximum  column  and  row  used  also.
  3640.                These  are  designed to make it easy to use the IR com-
  3641.                mand (Inplace Relocate) to go over only cells in use.  
  3642.  
  3643.                     The  function  *U  FFTFW and the function *U FFTRV
  3644.                perform Fast Fourier  Transforms  in  the  forward  and
  3645.                reverse  (inverse)  directions  on  the  given range of
  3646.                data.  The largest power of 2 of data points less  than
  3647.                or   equal   to   the   given   range  is  used  and  a
  3648.                one-dimensional real FFT is performed.  This is  useful
  3649.                for digital filters and the like.  The input values are
  3650.                replaced by their FFT so it is best to work with values
  3651.                copied  from the real inputs (use the *U MOVEV function
  3652.                to move the values before use).  
  3653.  
  3654.                     The  function  *U  LINEF  Vy:Vy,Vx:Vx (with the Vx
  3655.                range optional) fits a line to  the  input  range.   It
  3656.                will  use  the Vx range as the X coordinate if supplied
  3657.                or will compute a range if none is supplied  using  the
  3658.                cell coordinates.  It computes the line equation Y=mX+B
  3659.                and returns the slope m in accumulator U and the inter-
  3660.                cept B in accumulator T.  The value returned in accumu-
  3661.                lator % from the function is the Y  fit  error  of  the
  3662.                line fit.  The W accumulator gets the correlation coef-
  3663.                ficient of X and Y.  
  3664.   *XV filename V1 
  3665.   *XF filename V1        The *X class commands are for sheet linkages. 
  3666.                *XF  loads  a  Formula  from another saved spreadsheet,
  3667.                while *XV loads a Value (normally  from  a  NUMERICALLY
  3668.                saved  sheet).   They  look  in  the given file for the
  3669.                named variable in the saved sheet and place the formula
  3670.                or  value in the current position of the current sheet.
  3671.                Note the *P commands may be used to reset the  position
  3672.                if  it  is desired not to overwrite the current formula
  3673.                in the case of the *XF command;  the  *XV  command  as-
  3674.                sumes the sheet was saved numerically and does not mod-
  3675.                ify the formula.  Note that each *X class command  gets
  3676.                1 number or formula.  
  3677.  
  3678. AnalytiCalc Reference Manual                                   Page 72
  3679.  
  3680.  
  3681.  
  3682.                  AnalytiCalc File Interface Functions
  3683.  
  3684.       Command  level functions are given as FILcccccc where ccc is the
  3685.  actual command.  Equivalent functions are available from cells  using
  3686.  the  syntactic form *U DBcccccc arguments (where the "arguments" part
  3687.  is any arguments, generally some required.) 
  3688.  
  3689.       Some  extra  optional  VAX functions exist that allow regions of
  3690.  the sheet to come from or go to sequential or random files to or from
  3691.  some range of cells.  
  3692.  
  3693.       The  following  commands  exist  (the  "*U DB"  or  the "FIL" is
  3694.  omitted:) 
  3695.  
  3696.  
  3697.  
  3698.    OPINS range filename 
  3699.           Open  input  sequential  on filename for cells in range When
  3700.           the input file is open and any operation causes  a  read  of
  3701.           the  cell, the FORMULA will be taken from the file and used.
  3702.           If the file is opened with the OPINU  option  (for  Update),
  3703.           then  when  the FORMULA of the cell is written, it will also
  3704.           write to the file.  The OPINU option applies only to  random
  3705.           access  files.   Initially  both  input and output reads are
  3706.           disabled (ENAINP and ENAOUT enable them).  When a sequential
  3707.           file  (or  device such as a mailbox, pipe, or communications
  3708.           line) is used for input, it is  advantageous  to  read  data
  3709.           into a range once, then disable input/output again, to allow
  3710.           it to be handled between these  commands.   The  EDTINP  and
  3711.           FMTOUT commands are designed to do this to make it easier to
  3712.           use AnalytiCalc for a filter between sequential files.  
  3713.    OPINR range filename 
  3714.           Open input random on filename for cells in range 
  3715.    OPINU range filename 
  3716.           Open range for update on filename for read and write as ran-
  3717.           dom access.  
  3718.    CLSINP 
  3719.           Close input 
  3720.    CLSOUT 
  3721.           Close output 
  3722.    OPOUTS range filename 
  3723.           Open output sequential from range cells to filename 
  3724.    OPOUTR range filename 
  3725.           Open output random from range on filename 
  3726.    ENAINP 
  3727.           Enable input file readin (initially disabled) 
  3728.    ENAOUT 
  3729.           Enable output write (initially disabled) 
  3730.    DISINP 
  3731.           Disable input area readin 
  3732.  
  3733. AnalytiCalc Reference Manual                                   Page 73
  3734.  
  3735.  
  3736.  
  3737.    DISOUT 
  3738.           Disable output write 
  3739.    EDTINP range 
  3740.           Enables  input  and  output  and, for each cell in the given
  3741.           range,  reads  and  writes  the  cell,  allowing  the   file
  3742.           read/writes  to  take effect.  Each cell is flagged as valid
  3743.           but of text type;  the DF command must be used to reset  any
  3744.           that  should be treated as computable.  Input and output are
  3745.           disabled on completion of the command.  
  3746.    FMTOUT range 
  3747.    VALOUT range 
  3748.           Enables  input  and  output  and  for each cell of the range
  3749.           takes the VALUE of the cell, reads the cell, sets it of text
  3750.           type,  and  writes  the  text equivalent of its value to the
  3751.           cell.  In the FMTOUT command the cell's  display  format  is
  3752.           used  for  the  conversion.   In  the VALOUT command a large
  3753.           builtin format is used to preserve all  significant  digits.
  3754.           Spaces  are  discarded prior to output.  Cells are left con-
  3755.           taining textual data corresponding to their numeric  values,
  3756.           stored in the formulae.  The DF command may be used to reset
  3757.           these cells to numeric types if desired.  Conversion  errors
  3758.           are ignored.  Input and output are disabled on completion of
  3759.           the command.  
  3760.    CMPFRM V1:V2[,V3:V4] 
  3761.           Compares  two  formulas.   It returns, in the % accumulator,
  3762.           the index of the formula in cell V2 in the formula  in  cell
  3763.           V1.   Lengths  used are those of both formulas UNLESS the V3
  3764.           and V4 cell arguments are seen.  In that case the  value  of
  3765.           V3  will be used as the length of the formula for V1 and the
  3766.           value of V4 will be used as the length of cell V2.   If  ei-
  3767.           ther  value  in  V3 or V4 is outside the range 1 to 109 both
  3768.           values in V3 and V4 will be ignored.  Also on output  the  W
  3769.           accumulator  will  be set to -1.  if V1 is lexically earlier
  3770.           than V2, 0.  if they are lexically equal, and +1.  if V1  is
  3771.           lexically later than V2.  
  3772.    LENFRM V1:V2 
  3773.           returns  the  length of the formula for cell V1 in the % ac-
  3774.           cumulator and in cell V2 IF CELL V2 IS VALID.  Otherwise the
  3775.           cell  specified  in V2 is ignored, though it must be present
  3776.           in the command or function.  
  3777.    TRMFRM V1:V2,V3,V4 
  3778.           Reads  the formula in V1 and uses V3 and V4 as start and end
  3779.           byte numbers within it.  It returns to V2 the  formula  that
  3780.           is  between the start and end bytes, trimming the V1 formula
  3781.           into V2 by chopping out the undesired parts.  The find  sub-
  3782.           string  function  CMPFRM can be used to find delimiter bytes
  3783.           if absolute columnar formatting is not desired.  
  3784.  
  3785.  
  3786.  
  3787.  
  3788. AnalytiCalc Reference Manual                                   Page 74
  3789.  
  3790.  
  3791.  
  3792.       Associated  DBxxxxxx  and FILxxxxxx commands both exist and have
  3793.  the same syntax.  
  3794.  
  3795.       These  commands  give  a means for having a spreadsheet template
  3796.  operate on files (treated as formula inputs or  outputs)  from  other
  3797.  independent  programs.   Random files have 128 byte record length and
  3798.  unique indices computed from the relative position in the range being
  3799.  used.   Sequential files are variable length but never have more than
  3800.  110 bytes (formula size) in them.  Interpretation of formulas  is  up
  3801.  to the spreadsheet.  
  3802.  
  3803.       On sequential reads, data is read until EOF and then the file is
  3804.  closed.  Input is treated as a "last step" before returning the  for-
  3805.  mula  to  the  main program and just overwrites any internally stored
  3806.  formula.  A dummy  edit  will  enter  the  file  data  into  internal
  3807.  storage.   On  output,  file  write  and internal storage both occur.
  3808.  Open failure just leaves the files closed.  
  3809.  
  3810.       "range"  means  v1:v2,  a  full  2 dimensional matrix range with
  3811.  upper left corner and lower right corner cells  specified.   Calcula-
  3812.  tion  order  is unaffected and generally is across fast, down slower,
  3813.  like a TV raster scan.  
  3814.  
  3815.       The  functions for CMPFRM and LENFRM are provided in addition to
  3816.  the other functions here to allow the spreadsheet to more easily  lo-
  3817.  cate  and  parse text in data coming from generic applications.  Note
  3818.  that the {cell constructs can be used (possibly with an  *U  XQTCM  E
  3819.  function)  to  move pieces of text around in conjunction with copies.
  3820.  The CMPFRM function can help find out if the reply from the  applica-
  3821.  tion is what is desired and already built-in conditional handling can
  3822.  be used for acting on this information.  
  3823.  
  3824.       As in all these functions, CMPFRM and LENFRM have the forms 
  3825.  FILCMPFRM and 
  3826.  FILLENFRM interactively, and 
  3827.  *U DBCMPFRM and 
  3828.  *U DBLENFRM in formulas (with the remaining arguments included.) 
  3829.  
  3830.  
  3831.  
  3832.       These   functions  are  meant  to  allow  some  "connection"  of
  3833.  AnalytiCalc with arbitrary other applications by batch files  or  EX-
  3834.  ECed  subprocesses,  where AnalytiCalc can produce inputs for another
  3835.  application's console input and accept another  program's  output  as
  3836.  its input in an intelligent and controllable way.  
  3837.  
  3838.       Also the string functions provided can be useful for certain ap-
  3839.  plications independent of file I/O.  
  3840.  
  3841.  
  3842.  
  3843. AnalytiCalc Reference Manual                                   Page 75
  3844.  
  3845.  
  3846.  
  3847.                          -ADDITIONAL FEATURES-
  3848.  
  3849.       CALC  is similar to FORTRAN with respect to operator precedence.
  3850.  Blanks may occur anywhere on a command  line  without  effect  except
  3851.  after  a  single  quote mark used to specify a single ASCII character
  3852.  constant.  CALC extends the  ANSI  FORTRAN  syntax  by  allowing  the
  3853.  following:  
  3854.  
  3855.  
  3856.        1.  multiple assignments on one line, for example 
  3857.  
  3858.           I=J=K=812 
  3859.        2.  Unary + and unary - are allowed, for example 
  3860.           2*-3 
  3861.           +2+-7 
  3862.           -2**4 
  3863.           are  all legal.  The last expression evaluates to 16 because
  3864.           the unary - has a higher precedence than exponentiation.  
  3865.        3.  exponentiation may be indicated by using !  as well as ** 
  3866.  
  3867.       If any of the declarations are entered (such as *INTEGER) and no
  3868.  argument to this command is given, then CALC will print out the vari-
  3869.  ables  that  have been assigned that data type.  Note that a variable
  3870.  can be assigned to different data types using such commands and still
  3871.  not  be assigned a value.  If you attempt to output the value of such
  3872.  a variable, an error message will result.  
  3873.  
  3874.  
  3875.                               USAGE NOTES
  3876.    1.  When you iterate on a file by a call such as 
  3877.             *@REPEAT X 
  3878.     then note that 
  3879.      A)  X  must have been set to a positive value when the command is
  3880.           executed or else the file will not be executed.  
  3881.      B) If the file of commands does not change the value of the vari-
  3882.           able X you will enter an infinite loop.  You can  explicitly
  3883.           set X to a non-positive value, use the *Z command to zero it
  3884.           (if it is not %), or include a 
  3885.           *R 
  3886.           command  to  give you a chance to reset the variable and get
  3887.           out of the loop.  
  3888.      C)  *E and *S will allow you to exit from the command file REPEAT
  3889.           but will not of themselves prevent repetitions.  
  3890.      D)  Entering  constants  echo  on  the  terminal  (assuming *V is
  3891.           properly set) and can change the value and type of the vari-
  3892.           able  %.  This is important to remember when using % to con-
  3893.           trol the iteration of a file.  
  3894.    2.  In FORTRAN, 
  3895.           -A**2 is the same as -(A**2) 
  3896.      with CALC, 
  3897.  
  3898. AnalytiCalc Reference Manual                                   Page 76
  3899.  
  3900.  
  3901.  
  3902.           -A**2 is the same as (-A)**2 (just like SNOBOL!) 
  3903.    3.  If R and A are positive reals and I is a positive integer, some
  3904.           compilers like RSX-11M's  F4P  won't  allow  (at  run  time)
  3905.           evaluation of 
  3906.           (-I)**R 
  3907.           (-A)**R 
  3908.    4.  Under RSX-11M F4P you will find 
  3909.           2**.5 to have value 1 
  3910.      while 
  3911.           2.**.5 has value 1.41421356237310 
  3912.    5.   10E10  is  a  hexadecimal constant (integer) while 10.E10 is a
  3913.           real.  
  3914.  
  3915. AnalytiCalc Reference Manual                                   Page 77
  3916.  
  3917.  
  3918.  
  3919.                               Appendix A
  3920.  
  3921.   ASCII  CALC   ASCII  CALC   ASCII  CALC   ASCII  CALC
  3922.   CODE   PRINTS CODES  PRINTS CODE   PRINTS CODE   PRINTS
  3923.   ----   ------ -----  ------ ----   ------ ----   ------
  3924.  
  3925.     0    ^      32            64     @      96     `
  3926.     1    ^!     33     !      65     A      97     a
  3927.     2    ^"     34     "      66     B      98     b
  3928.     3    ^#     35     #      67     C      99     c
  3929.     4    ^$     36     $      68     D      100    d
  3930.     5    ^%     37     %      69     E      101    e
  3931.     6    ^&     38     &      70     F      102    f
  3932.     7    ^'     39     '      71     G      103    g
  3933.     8    ^(     40     (      72     H      104    h
  3934.     9    ^)     41     )      73     I      105    i
  3935.    10    ^*     42     *      74     J      106    j
  3936.    11    ^+     43     +      75     K      107    k
  3937.    12    ^,     44     ,      76     L      108    l
  3938.    13    ^-     45     -      77     M      109    m
  3939.    14    ^.     46     .      78     N      110    n
  3940.    15    ^/     47     /      79     O      111    o
  3941.    16    ^0     48     0      80     P      112    p
  3942.    17    ^1     49     1      81     Q      113    q
  3943.    18    ^2     50     2      82     R      114    r
  3944.    19    ^3     51     3      83     S      115    s
  3945.    20    ^4     52     4      84     T      116    t
  3946.    21    ^5     53     5      85     U      117    u
  3947.    22    ^6     54     6      86     V      118    v
  3948.    23    ^7     55     7      87     W      119    w
  3949.    24    ^8     56     8      88     X      120    x
  3950.    25    ^9     57     9      89     Y      121    y
  3951.    26    ^:     58     :      90     Z      122    Z
  3952.    27    ^;     59     ;      91     [      123    {
  3953.    28    ^<     60     <      92     \      124    \
  3954.    29    ^=     61     =      93     ]      125    }
  3955.    30    ^>     62     >      94     ^      126    ^
  3956.    31    ^?     63     ?      95     _      127
  3957.  
  3958.  
  3959.  
  3960.             Interactive Calc in the AnalytiCalc environment
  3961.  
  3962.       Calc  runs as part of AnalytiCalc to do much of the math.  The K
  3963.  command drops into straight Calc and  it  works  as  described  here.
  3964.  There are a few additions however.  
  3965.  
  3966.       First,  Calc can access all the variables on the sheet (names a1
  3967.  and up), which may be up to 8 bytes  long.   However,  while  it  can
  3968.  examine or set any of these, the spreadsheet recomputes them from its
  3969.  
  3970. AnalytiCalc Reference Manual                                   Page 78
  3971.  
  3972.  
  3973.  
  3974.  disk based formula file when re-entered by the *E command.  To modify
  3975.  this  file,  the "current position" in the physical display sheet may
  3976.  be set by answering the prompts after giving the  *P  command.   Then
  3977.  the  current  display value (contents of the "%" variable) may be en-
  3978.  tered into the disk file by executing the *W command.  Numerous other
  3979.  manipulations are possible, and by setting the view level to 3 (*V 3)
  3980.  it is possible to debug a command file that drives a spreadsheet cell
  3981.  from  interactive mode (by tracing through its' operation to see what
  3982.  it is doing).  All interactive Calc commands work also from  indirect
  3983.  files.   The  physical location is clamped to legal values.  Note too
  3984.  that any unused cells of the sheet may be used as  scratch  accumula-
  3985.  tors.   However,  they may not assume any types of multiple precision
  3986.  numbers, as they are all 8 bytes long.  The internal expression stack
  3987.  is  40  tokens deep, so very complex expressions may have to be split
  3988.  into pieces to work.  Error messages will be shown if  this  happens;
  3989.  they are placed on the top line of the screen.  
  3990.  
  3991.  
  3992.  
  3993.  
  3994.                     The AnalytiCalc GRAPHICS System
  3995.  
  3996.                                 ACGRAF
  3997.  
  3998.             GRAPHICS INTERFACE AND OUTPUT FROM ANALYTICALC
  3999.  
  4000.  
  4001.  
  4002.                              Introduction
  4003.  
  4004.       The  AnalytiCalc  system  uses a separate program to provide its
  4005.  graphics output, permitting  easy  tailoring  to  different  graphics
  4006.  devices.   The  routine supplied uses a character graphics subroutine
  4007.  (GHASP) to produce histograms and scatter  plots  from  any  rows  or
  4008.  columns  of a saved (numerically saved, that is) sheet which has been
  4009.  saved via the PPN or PDN commands.  The output is  printed  normally.
  4010.  However,  users  with other devices may easily modify this program to
  4011.  insert their own favorite graphics output device output into the pro-
  4012.  gram.  There are several options to govern plotting, and one plot per
  4013.  command is produced.  Once a saved sheet is generated, many plots can
  4014.  be made from it without reentering the sheet.  
  4015.  
  4016.       An advantage of this approach is that the address space consumed
  4017.  by the graphical routines is not taken from the spreadsheet.   Graph-
  4018.  ics  may  be  handled  with  a fair degree of transparency by command
  4019.  files, or even by spawned commands.  Another advantage is that  addi-
  4020.  tional  graphics  devices may be added easily without modification to
  4021.  the spreadsheet.  The current  version  uses  character  graphics  to
  4022.  permit  usable  displays  even on monochrome monitors.  (Note:  there
  4023.  are several additional graphics programs supplied which are given  in
  4024.  
  4025. AnalytiCalc Reference Manual                                   Page 79
  4026.  
  4027.  
  4028.  
  4029.  source   in   BASIC.   These  provide  additional  functionality  not
  4030.  described here but allow line  charts,  bar  charts,  piecharts,  and
  4031.  numerous other options.) 
  4032.  
  4033.  
  4034.  
  4035.       Getting Started:  
  4036.  
  4037.       Run  AnalytiCalc  (Type  ANALY)  and create your spread sheet to
  4038.  your liking.  When it is set, use the following commands:  
  4039.  
  4040.      L A1    go to cell A1 (top left of sheet
  4041.      PPN     Put out physical sheet numerically.
  4042.  
  4043.  When  AnalytiCalc  asks for a filename, give one which describes your
  4044.  file well (with a file  type)  followed  by  return.   Example:   My-
  4045.  file.num 
  4046.  
  4047.       When  AnalytiCalc asks you for maximum displacements, enter 0 in
  4048.  both cases (equivalent to telling it to save everything).  
  4049.  
  4050.       When done, you may use the X command to exit AnalytiCalc.  
  4051.  Now run ACGRAF by typing ACGRAF 
  4052.  When ACGRAF first starts, it asks for an output dataset.  This may be
  4053.  any file or device on the system.  If CON:  is used  as  output  (the
  4054.  terminal),  or  if  the filename chosen begins with the letters "TT",
  4055.  the graph will be scaled to fit on a terminal screen.   Otherwise  it
  4056.  will  be  sized to fit a sheet of (normally 132 column) printer paper
  4057.  and will have some extra  statistical  information  about  the  plot.
  4058.  When  ACGRAF runs, it will ask for a command line.  A typical command
  4059.  to give a scaled plot of column H from row 1 to row 30 would be 
  4060.  
  4061.  Enter plot command>NN myfile.num H1:H30 [S] 
  4062.  
  4063.  
  4064.       Note  that the rows and columns are referred to exactly s on the
  4065.  sheet itself.  The initial NN could be  LL  or  LN  or  PP  or  other
  4066.  letters,  but L in column 1 takes the logarithm of the numbers in the
  4067.  first (in the example the only) range of numbers selected, and  L  in
  4068.  column  2  takes  the log of the numbers in the second range.  A P is
  4069.  used instead of an N where the values displayed should start from  0.
  4070.  rather than from the lowest value in the region selected.  
  4071.  
  4072.       Should  the  range  to be plotted include only POSITIVE numbers,
  4073.  make the first 2 letters P's.  This will ensure the scale starts at 0
  4074.  rather than at the minimum positive value selected.  The command line
  4075.  would then look like:  
  4076.  
  4077.  Enter plot command>PP myfile.num H1:H30 [S] 
  4078.  
  4079.  
  4080. AnalytiCalc Reference Manual                                   Page 80
  4081.  
  4082.  
  4083.  
  4084.       Scatter  plots  plot  entries  in  the  first range against cor-
  4085.  responding entries in the second  range  selected.   One  dimensional
  4086.  plots  are up to 100 bins wide and scatter plots are up to 50 bins by
  4087.  50 bins.  Height of histograms is Scaled to fit a  page  if  the  [S]
  4088.  form is used and will Vary to whatever is needed if the [V] character
  4089.  is used.  Widths of plots are less than 100 (or 50) if the number  of
  4090.  entries plotted are less than those dimensions;  if the number of en-
  4091.  tries plotted is greater, it will be scaled to  the  50  or  100  bin
  4092.  maxima  (which  derive from paper size mainly).  If the option [H] is
  4093.  chosen, the plot will be Hacked off at one page, but scaled as if the
  4094.  [V] Vary option were specified.  
  4095.  
  4096.  
  4097.       SYNTAX AND USAGE:  
  4098.  
  4099.       This program is designed to allow an interactive user to enter a
  4100.  single command line to the program which  it  will  parse  and  allow
  4101.  graphic  output from AnalytiCalc saved spread sheets.  The assumption
  4102.  made is that the sheet has been saved with the PPN  or  PDN  command.
  4103.  The  filename  must  appear  in the command line and variables in the
  4104.  file (named AS THOUGH THE CURSOR HAD BEEN IN CELL A1 WHEN THE  PPN  /
  4105.  PDN  WAS  DONE)  may  be  histogrammed or scatterplotted against each
  4106.  other.  
  4107.  
  4108.  A  FORTRAN  plot  package for ordinary printers will be used for this
  4109.  version.  Other routines may be  readily  used  as  replacements  for
  4110.  specific  graphics  output  devices.   There  is  a document supplied
  4111.  PCSAVFMT.TXT which will give the format used to save AnalytiCalc/Por-
  4112.  taCalc  files to simplify reading them in.  The popular VisiCalc (tm)
  4113.  DIF format was NOT used in this program because it cannot encode  the
  4114.  variety of display formats available.  The format chosen was rather a
  4115.  straight ASCII format permitting almost  any  language  to  read  the
  4116.  saved  files with a minimum of grief, and which permits editing saved
  4117.  sheets with a  normal  text  editor.   (The  fields  are  even  comma
  4118.  separated to make reading in with BASIC easier.) 
  4119.  
  4120.  Input syntax:  
  4121.  PP or NN or LL filename.ext V1:V2 [c] V3:V4 +switches 
  4122.  where 
  4123.  
  4124.       an  L  in  columns  1 or 2 takes log of 1st or 2nd range numbers
  4125.  (base 10), a P indicates Positive numbers (so 0 is  included  in  the
  4126.  range  to  be plotted and the plot starts at 0.  and increases rather
  4127.  than starting at the minimum observed value for an  initialized  cell
  4128.  in  the saved sheet), and N means Normal, i.e., neither of the above;
  4129.  the minimum and maximum coordinates are taken as min and  max  values
  4130.  in the set of values to be plotted, 
  4131.  
  4132.       filename.ext  appears  at  the start of the command line after a
  4133.  space and with a space following it and is a valid RSX  or  VMS  file
  4134.  
  4135. AnalytiCalc Reference Manual                                   Page 81
  4136.  
  4137.  
  4138.  
  4139.  speciciation  (the  same  as was given to AnalytiCalc in the PP or PD
  4140.  command that saved the sheet normally).  
  4141.  
  4142.       V1:V2  and V3:V4 are ranges.  V3:V4 is optional and its presence
  4143.  implies a scatter plot.  These ranges must  be  either  a  row  or  a
  4144.  column  or part of them.  If only range V1:V2 is present, a histogram
  4145.  will be done using the Scale option of GHASP to fit the plot  onto  a
  4146.  page.   The plot will be set up for 100 bins horizontal, 50 vertical,
  4147.  or the number of entries to be plotted, whichever is less.  
  4148.  
  4149.       If  the  V3:V4 range exists, the character Q in the [c] position
  4150.  (the [] are required) will result in a "density" plot  in  which  the
  4151.  program  will  attempt to print darker in filled bins.  This is crude
  4152.  and the default is to use a 2 digit number.  Again, plot size will be
  4153.  scaled  to  50  by  50 bins.  For histograms, the character S implies
  4154.  Scale the plot to fit one sheet of paper,  the  character  H  implies
  4155.  Hack  the  plot  off  at  one sheet, and the character V implies Vary
  4156.  height, using as many sheets of paper as needed  to  plot  the  data.
  4157.  The  character  S should be used for "normal" scatter plots (in which
  4158.  number of entries in a scatter plot "bin" is represented as a  number
  4159.  or character).  
  4160.  
  4161.       To use ACGRAF from inside AnalytiCalc, use the $ command to pass
  4162.  the command line to the system;  this will allow graphics to be  done
  4163.  without  leaving  the AnalytiCalc environment.  This can be done from
  4164.  an indirect file driving AnalytiCalc also, without special  interven-
  4165.  tion, using normal DOS redirection commands.  
  4166.  
  4167.       Two  switches  are implemented.  +Hnnn sets Height of the result
  4168.  plot to nnn characters.  +Wnnn sets the Width of the result  plot  to
  4169.  nnn  characters.   Both  may  be specified for a plot;  they override
  4170.  default sizes.  They may be used to produce smaller graphs than usual
  4171.  for inclusion in documents or displays.  
  4172.  
  4173. AnalytiCalc Reference Manual                                   Page 82
  4174.  
  4175.  
  4176.  
  4177.                               Appendix B
  4178.                 Discussion of Storage Allocation Issues
  4179.  
  4180.  
  4181.                      Storage Allocation Discussion
  4182.  
  4183.       If you use AnalytiCalc, the storage needed per cell in the work-
  4184.  file is 10 bytes per cell, and for formulas, 12 bytes of  formula  go
  4185.  into  every  16  bytes  of  workfile (the remainder is for accounting
  4186.  overhead).  Thus, for an 18,000 cell sheet, 180K bytes is the maximum
  4187.  useful  value  file  size, and 288K bytes would permit a 12 character
  4188.  formula for each cell, while 2592K bytes would give  every  cell  108
  4189.  characters  and  is  the maximum useful size.  (You can allocate more
  4190.  memory to allow 109 characters per cell, but  this  usually  will  be
  4191.  mostly  wasted.) Since a symbol table algorithm is used, sizes may be
  4192.  as small as desired.  If the size chosen is less than the memory  al-
  4193.  location  built  in (1K is guaranteed to be), no files will be opened
  4194.  and cells will be stored in memory only.  Note that if value and for-
  4195.  mula file sizes are given negative, a slower but sometimes more effi-
  4196.  cient packing will be done of the file.  The workfiles are opened  in
  4197.  one's  default device at the time of running the program.  The "slow"
  4198.  algorithm picks a diskfile page to use by taking the cell number mod-
  4199.  ulo the number of pages in the file.  The "fast" one picks a diskfile
  4200.  page to use by taking the position in the total  sheet  (columns  in-
  4201.  creasing  fastest)  and making the number of cells in a diskfile page
  4202.  vary as number in the sheet divided by  the  size  of  the  diskfile.
  4203.  Thus,  cells  close to one another on the sheet are kept close on the
  4204.  disk file.  This can overflow a disk page if too  many  cells  for  a
  4205.  page  are  used close to each other.  Therefore, the program will ask
  4206.  you how many rows and columns you propose to use for purposes of disk
  4207.  clustering.   If  the "fast" algorithm is used, the disk page will be
  4208.  chosen as (cell address)*(number of disk pages  total)/(size  of  the
  4209.  total  sheet  you  said you'd use, clamped to the max physical size).
  4210.  If you say you'll use a small area, cells will be  scattered  better.
  4211.  If you use beyond the area you said, disk pages are chosen in modular
  4212.  fashion.  Therefore, if you run out of room in  a  file,  try  either
  4213.  varying  the  size  for allocation, or adding space to the files.  If
  4214.  you give the exact size you're really  using,  the  "fast"  algorithm
  4215.  will equally divide disk pages among cells on the screen you're using
  4216.  for rectangular use.  The size question is ignored if the "slow"  al-
  4217.  gorithm  is used, since that algorithm equipartitions without needing
  4218.  to know the size used.  Typical values to use for the number of  rows
  4219.  and  columns  you intend to use for small problems might be 16 by 16.
  4220.  The program asks how big to make the disk  based  files  next,  given
  4221.  that it now knows how to allocate cells to the files.  
  4222.  
  4223.       There  are  two effects of importance here.  First, if you don't
  4224.  allocate enough space, scratch files may overflow and you'll have  to
  4225.  save  the  sheet and rerun with bigger files.  Second, if the scratch
  4226.  files are TOO big, the program will waste  time  switching  pages  in
  4227.  
  4228. AnalytiCalc Reference Manual                                   Page 83
  4229.  
  4230.  
  4231.  
  4232.  memory  unnecessarily.  Therefore, when you tell AnalytiCalc how much
  4233.  space you intend to use, it prints out the sizes of files needed  AS-
  4234.  SUMING  that  you will fill in EVERY cell in the range indicated, and
  4235.  that formulas are 12 or less characters long.  If you use less cells,
  4236.  both  files may be shorter.  If formulas are longer, the formula file
  4237.  needs to be made bigger.  The program won't actually go out  to  disk
  4238.  unless  the  files  are  bigger  than its in memory buffers, so don't
  4239.  worry about that condition.  The suggested sizes are usually  a  good
  4240.  guess.   (These  are printed on the screen after you tell it how many
  4241.  rows and columns you intend to use.) 
  4242.  
  4243. AnalytiCalc Reference Manual                                   Page 84
  4244.  
  4245.  
  4246.  
  4247.                               Appendix C
  4248.                        AnalytiCalc Logical Names
  4249.  
  4250.  
  4251.       AnalytiCalc/Amiga  has  a  symbol table and allows you to define
  4252.  symbolic names of up to 16 characters length, containing  letters  or
  4253.  numbers, and use them inside equations.  
  4254.  
  4255.       To define a symbolic name, use the command 
  4256.  
  4257.  TE {SYMBOLICNAME=Vn 
  4258.  
  4259.  where Vn is a cell name (like A5, R17, AB122, or the like), and "SYM-
  4260.  BOLICNAME" is the name you wish to define.  The  name  is  now  asso-
  4261.  ciated with the CONTENTS OF the cell named (as Vn).  When you use the
  4262.  construct {SYMBOLICNAME in an equation, the contents of the cell  as-
  4263.  sociated  with  that  name replace the name prior to evaluation.  Any
  4264.  contents may be used, though the total resulting string must not grow
  4265.  to  over  109 characters.  Recursive substitutions are permitted to a
  4266.  depth of 20, so name definitions may use other name definitions.  
  4267.  
  4268.       To remove a name definition, use the command 
  4269.  
  4270.  TE {SYMBOLICNAME=0 
  4271.  
  4272.  You  should  remove definitions explicitly since they are not automa-
  4273.  tically removed by adding new definitions.  
  4274.  
  4275.       Up  to 301 names may be defined in the sheet.  Note that scratch
  4276.  cells A0 through approximately BK0 may be used to hold definitions if
  4277.  desired.  
  4278.  
  4279.       To  store  cell  definitions  for later use, the special command
  4280.  must be used as follows to save them:  
  4281.  
  4282.  TE {*= 
  4283.  
  4284.  This  will  cause  AnalytiCalc  to ask for an Output file.  You reply
  4285.  with a filename to store (or show) the definitions.  The program will
  4286.  then  dump  all known symbol definitions in the same format needed to
  4287.  do the definitions of the names.  If a disk file is specified, it can
  4288.  be read in via the @file command so the symbols may be redefined to a
  4289.  later AnalytiCalc run.  
  4290.  
  4291.       Storing  definitions  on a CON:  window can give a quick look at
  4292.  them interactively, but usually it is better to print the definitions
  4293.  (which  can  be  done by giving PRT:  (or your printer's real name if
  4294.  that's not it) as the output file name.  
  4295.  
  4296.  
  4297. AnalytiCalc Reference Manual                                   Page 85
  4298.  
  4299.  
  4300.  
  4301.       This  facility can save considerable formula typing time.  Where
  4302.  you have a very large formula to be duplicated many times, if it  can
  4303.  be  specified  relocatably,  a  reference to a short name (or a cell,
  4304.  since {name and {cell function the same) can save storage  and  allow
  4305.  you to get by with smaller disk work files.  
  4306.  EXAMPLE RUN:
  4307.  
  4308.  L D0                    ;  go to phantom cell D0
  4309.  ET SUM[A1:A4]           ;  fill in a macro definition as text
  4310.  TE {SALES=D0            ;  define "sales" as this sum
  4311.  M2                      ;  set automatic motion down
  4312.  L A1                    ;  go to A1 
  4313.  E 2.3                   ;  enter some junk data just to show this
  4314.  E 4.86
  4315.  E 1.2647
  4316.  E 8.3454
  4317.  EV {SALES               ;  Enter sales value as a numeric.
  4318.          ;  the cell will display the sum of A1 thru A4.
  4319.  
  4320.  An example position independent formula might be:  
  4321.  
  4322.  SUM[ P#0#-5:P#0#-1] 
  4323.  
  4324.  which  means  the  sum of the cells from 5 above the current physical
  4325.  cell to 1 above the physical cell.  This form if used in a name  will
  4326.  work wherever it is used, regardless of location.  
  4327.  
  4328. AnalytiCalc Reference Manual                                   Page 86
  4329.  
  4330.  
  4331.  
  4332.                               Appendix D
  4333.                      AnalytiCalc Function Summary
  4334.  
  4335.  
  4336.       The available multiple argument functions are:  
  4337.    SUM[variables]     Sum of all arguments
  4338.    MAX[variables]     Max of arguments
  4339.    MIN[variables]     Min of arguments
  4340.    AVG[variables]     Average of arguments
  4341.    AVE[variables]     Average of arguments excluding zero args
  4342.    STD[variables]     Standard deviation squared
  4343.    AND[variables]     Boolean AND of all variables in list
  4344.    IOR[variables]     Boolean inclusive OR of variables
  4345.    NOT[variable]      Boolean complement of variable
  4346.    XOR[v1,v2]         Boolean exclusive OR of v1,v2
  4347.    EQV[V1,V2]         Boolean "equivalence" of V1,V2
  4348.                       (complement of exclusive OR, true if
  4349.                       bits have the SAME value)
  4350.    CNT[variables]     Number of nonzero variables in list
  4351.    MOD[V1,V2]         Returns V1 modulo V2 (i.e., remainder
  4352.                       of V1/V2 division.)
  4353.    SGN[v1]            Returns 1.0 times sign of V1
  4354.    LKP[var,variables] Lookup variable in "variables" range
  4355.                       greater or equal to var, return its
  4356.                       index (starting with 0) into variables
  4357.                       range.
  4358.    LKN[var,variables] Lookup variable in "variables" range
  4359.                       less than or equal to var, return its
  4360.                       index (starting with 0) into variables
  4361.                       range.
  4362.    LKE[var,variables] Lookup variable in "variables" range
  4363.                       strictly equal to var, return its index
  4364.                       (starting with 0) into range. Note all
  4365.                       LKP, LKN, LKE return the last variable
  4366.                       index if no satisfactory value found.
  4367.    NPV[disc,vars]     Net Present Value of vars (equal time
  4368.                       interval numbers), at discount rate
  4369.                       disc where disc is a fraction
  4370.                       (e.g., .12 for 12%)
  4371.    IRR[PV,FV,returns] Internal Rate of Return. Will compute
  4372.                       internal rate of return on up to 20
  4373.                       periods, returning rate per period.
  4374.                       The returns are expected to be at
  4375.                       equal time intervals. PV and FV are
  4376.                       initial and final values of investment
  4377.                       and the result is computed via Newton
  4378.                       approximation.
  4379.     PMT[princ,inter,nper] Payment (mortgage payment per period)
  4380.                       function. Will compute payment per period
  4381.                       for principal amount "princ" with interest
  4382.  
  4383. AnalytiCalc Reference Manual                                   Page 87
  4384.  
  4385.  
  4386.  
  4387.                       per period as "inter" and number of periods
  4388.                       as "nper". All arguments must be cells.
  4389.                       The formula is the standard ordinary annuity
  4390.                       formula. Interest rate must be a fraction so
  4391.                       that 14% would be 0.14, for example.
  4392.     PVL[payment,inter,nper] Present Value formula. Computes present
  4393.                       value of an annuity given "payment", the payment
  4394.                       per period, interest rate per period (as a
  4395.                       fraction, so 12% is 0.12) in "inter", and
  4396.                       number of periods as "nper". All arguments
  4397.                       must be in cells.
  4398.     RND[DUM]          Generates a random number between 0. and
  4399.                       1.0. An argument is needed but it is
  4400.                       NOT touched by this function.
  4401.  .INDEX Random numbers
  4402.  .Index RND function
  4403.  
  4404.     IF [V1.rel.V2] statement | else-statement
  4405.      Compares two variables and executes either "statement" (if the
  4406.       relation is true) or "else-statement" (if the relation is
  4407.       false).
  4408.      Valid relations (in the place of the .rel. above) are:
  4409.        .EQ.    Equal
  4410.        .NE.    Not Equal
  4411.        .GT.    Greater than (V1 greater than V2)
  4412.        .LT.    Less than (V1 less than V2)
  4413.        .GE.    Greater than or Equal to (V1 >= V2)
  4414.        .LE.    Less than or Equal to (V1 =< V2)
  4415.  
  4416.  
  4417.       The following special constructs in a formula act as functions: 
  4418.           _@V1,V2  Means  get  the  values stored in V1 and V2 and use
  4419.                them as column and row locations pointing at some  cell
  4420.                in  the  sheet.  Replace the construct with the name of
  4421.                that cell.  
  4422.           _#V1  Means take the real number in cell V1 and unpack it as
  4423.                if it had been a packed value from  a  formula  with  8
  4424.                characters packed;  then convert it back into ASCII and
  4425.                place in the formula in place of this construct.   This
  4426.                construct  is  intended  to  be  used with the *U STRVL
  4427.                function to allow retrieval and edit of formulas.   The
  4428.                *U XQTCM  function  permits  use  of  the  EDit command
  4429.                within a cell for string manipulation.  
  4430.  
  4431.       The following single argument functions are available:  
  4432.  
  4433.   FUNCT NAME   ARG TYPE    FUNCT VALUE   DESCRIPTION
  4434.   -------------------------------------------------------
  4435.   ABS          REAL        REAL         absolute value
  4436.   DABS         REAL        REAL         absolute value
  4437.  
  4438. AnalytiCalc Reference Manual                                   Page 88
  4439.  
  4440.  
  4441.  
  4442.   IABS         INTEGER     INTEGER      absolute value
  4443.   IFIX         REAL        INTEGER      REAL to INT conv.
  4444.   AINT         REAL        REAL         REAL truncation
  4445.   INT          REAL        INTEGER      REAL to INT conv.
  4446.   IDINT        REAL        INTEGER      REAL to INT conv.
  4447.   EXP          REAL        REAL         e**X
  4448.   DEXP         REAL        REAL         e**X
  4449.   ALOG         REAL        REAL         natural logarithm
  4450.   DLOG         REAL        REAL         natural logarithm
  4451.   ALOG10       REAL        REAL         logarithm base 10
  4452.   DLOG10       REAL        REAL         logarithm base 10
  4453.   SQRT         REAL        REAL         square root
  4454.   DSQRT        REAL        REAL         square root
  4455.   SIN          REAL        REAL         trigonometric sine
  4456.   DSIN         REAL        REAL         trigonometric sine
  4457.   COS          REAL        REAL         trig. cosine
  4458.   DCOS         REAL        REAL         trig. cosine
  4459.   TANH         REAL        REAL         hyperbolic tangent
  4460.   DTANH        REAL        REAL         hyperbolic tangent
  4461.   ATAN         REAL        REAL         arc tangent
  4462.   DATAN        REAL        REAL         arc tangent
  4463.  
  4464.  
  4465.       The following "equation commands" also act as functions with the
  4466.  effects described:  
  4467.   *@filename      Where  filename  is  the name of a file of CALC com-
  4468.                mands.  CALC reads the file and executes the commands. 
  4469.   *ASCII     Declares a list of variables to be of type ASCII.  
  4470.   *C     COMMENT line.  
  4471.   *N     NOVIEW.  
  4472.   *V     VIEW.  Controls printing options in K mode 
  4473.   *R     READ.  Allows a single line to be read from the terminal.  
  4474.   *REAL     declares specified variables to be REAL*8.  
  4475.   *DECIMAL     Declares specified variables to be REAL*8.  
  4476.   *S     STOP.  Same as *E.  Goes back to spreadsheet.  
  4477.   *E     EXIT.  Gets out of K mode, back to spreadsheet mode.  
  4478.   *Z     ZERO.  Zeroes all accumulators.  
  4479.   *G        *G  V1,V2  (where V1 and V2 are cell or accumulator names)
  4480.                will evaluate V1 and V2 as the column and row  numbers,
  4481.                on  the  physical  sheet, of the desired cell.  The ad-
  4482.                dressed cell's value  is  retrieved  and  used  as  the
  4483.                resulting number.  
  4484.   *W        Takes  the  value at the current cell and writes it out to
  4485.                the formula as a numeric  (floating)  value.   The  *WF
  4486.                command  stores the cell similarly, but uses the format
  4487.                of the current cell instead of the D32.25  format  used
  4488.                for *W.  
  4489.   *P        The  *P  command  resets  the current cell coordinate from
  4490.                within a cell (until the next cell is evaluated  only).
  4491.                It has several forms:  
  4492.  
  4493. AnalytiCalc Reference Manual                                   Page 89
  4494.  
  4495.  
  4496.  
  4497.              *P - By itself, *P causes Calc to prompt for the new phy-
  4498.                sical column and row number.  
  4499.              *P V1 - This moves the current location to the named cell
  4500.                where V1 is the cell name (e.g.  A5, H2) 
  4501.              *P@  V1,V2  -  This uses V1 and V2 (cell names) as column
  4502.                and row numbers and changes the current  physical  cell
  4503.                position  to  that  defined by the contents of cells V1
  4504.                and V2.  This gives complete addressing  of  the  sheet
  4505.                from within any cell.  
  4506.   *F         *F Label - If the value in % is positive and nonzero this
  4507.                command rewinds the input file for  the  AnalytiCalc  @
  4508.                command  and seeks a line beginning with the characters
  4509.                *CLabel (where "label" is what you  put  after  the  *F
  4510.                command).  
  4511.   *J         *J  Label  -  This  command behaves as the *F command but
  4512.                operates on the file used by the Calc *@ command rather
  4513.                than the AnalytiCalc one.  
  4514.   *QF 
  4515.   *QW         The  *QF  (Float)  or  *QW  (write) commands are used to
  4516.                examine sequential files  created  outside  AnalytiCalc
  4517.                and return values or formulas.  Their syntax is 
  4518.            *QF filename ?key1?  ?key2?  <lm> 
  4519.         or *QW filename ?key1?  ?key2?  <lm> 
  4520.                where ?key2?  is optional 
  4521.                l  and  m are delimiter characters for start and end of
  4522.                the parts of the selected records to extract  (defaults
  4523.                to  first part of the record) filename is just the file
  4524.                specifier in the host OS.  The *QF command gets a  part
  4525.                of  a record containing the keys specified and turns it
  4526.                into a number ("floats" it).  The  *QW  command  Writes
  4527.                that  part  of  the  record  to a formula.  The special
  4528.                characters  in  the  <lm>  part  of  the  command   are
  4529.                delimiters of the area to be picked out.  Variant forms
  4530.                allow such choosing to be by column number  instead  of
  4531.                key character if needed.  
  4532.  
  4533.   *U YRMOD VY,VM,VD 
  4534.  
  4535.                returns  the  Julian date (in %) computed from the Year
  4536.                (in VY), the month (in VM) and the day (in  VD),  where
  4537.                VY,  VM,  and  VD  are  sheet  cells.  These may be the
  4538.                result of date arithmetic.  
  4539.  
  4540.   *U JDATE Var 
  4541.  
  4542.                assumes  the  formula in cell Var (any spreadsheet cell
  4543.                name) contains a date string in  the  format  YY/MM/DD.
  4544.                It reads this formula and converts the date to a Julian
  4545.                date, returning it in the % accumulator.  
  4546.  
  4547.  
  4548. AnalytiCalc Reference Manual                                   Page 90
  4549.  
  4550.  
  4551.  
  4552.   *U JTOCH Jul,Var 
  4553.  
  4554.                assumes  that  variable Jul (any spreadsheet cell) con-
  4555.                tains a Julian date and changes it into an ASCII string
  4556.                in the cell whose name is in the Var position here.  
  4557.  
  4558.   *U DATE VY,VM,VD,Var 
  4559.  
  4560.                uses  VY,  VM,  and VD as year, month and day, and com-
  4561.                putes a Julian date from them.   It  then  composes  an
  4562.                ASCII  string of form YY/MM/DD for that date and stores
  4563.                in the formula for Var.  
  4564.  
  4565.   *U WKDYS D1,D2 
  4566.  
  4567.                computes the number of workdays between Julian dates D1
  4568.                and D2 just as taking  the  difference  of  two  Julian
  4569.                dates gives differences between calendar dates in days. 
  4570.  
  4571.   *U WKDIN D1,N1 
  4572.  
  4573.                returns  a  Julian  date that is N1 work days after the
  4574.                date in D1.  
  4575.  
  4576.   *U IDATE() 
  4577.  
  4578.                returns the current date as a Julian day.  
  4579.  
  4580.   *U MTXEQ(AA:AA,XX:XX,BB:BB) 
  4581.  
  4582.                solves  equation  AX=B  where A, X, and B are matrices,
  4583.                and where the notation AA:AA means  two  cells  at  the
  4584.                upper  left  and  lower  right  edges of matrix A (e.g.
  4585.                B2:C3 for the 2 X 2 matrix so defined), and  the  XX:XX
  4586.                and  BB:BB  notation means the same for the X and B ma-
  4587.                trices.  
  4588.  
  4589.   *U MOVEV mtxa,mtxb 
  4590.  
  4591.                moves values from mtxa to mtxb (useful prior to calling
  4592.                MTXEQ).  
  4593.  
  4594.   *U MDET mtx 
  4595.  
  4596.                This  function  computes and returns the determinant of
  4597.                matrix mtx.  
  4598.  
  4599.   *U MPROD A,B,C 
  4600.  
  4601.                This function will multiply matrix A by matrix B giving
  4602.  
  4603. AnalytiCalc Reference Manual                                   Page 91
  4604.  
  4605.  
  4606.  
  4607.                matrix C, provided that their dimensions  are  compati-
  4608.                ble.  
  4609.  
  4610.   *U MADDV A,B,C 
  4611.  
  4612.                This  function  adds matrix A to matrix B and stores in
  4613.                matrix C.  All matrices must have the same dimensions. 
  4614.  
  4615.   *U MSUBV A,B,C 
  4616.  
  4617.                This  function subtracts matrix B from matrix A leaving
  4618.                the result in matrix C.  
  4619.  
  4620.   *U MMPYT A,B,C 
  4621.  
  4622.                This function multiplies matrix A-transpose by matrix B
  4623.                and stores the result in matrix C;  dimensions must  be
  4624.                compatible.  
  4625.  
  4626.   *U MMPYC A,B,K 
  4627.  
  4628.                This  function  multiplies every element of matrix A by
  4629.                constant K.  
  4630.  
  4631.  
  4632.   *U VARY X,A,W,I,P;Q;R;S;T;U;V;W 
  4633.  
  4634.                (Equation Solving by Iterative Search) 
  4635.  
  4636.                This   function  allows  AnalytiCalc  to  automatically
  4637.                search for solutions to equations over up to  8  dimen-
  4638.                sions.  The operation is that the accumulators named in
  4639.                the fields shown as P;Q;R;S;T;U;V;W (one to  8  may  be
  4640.                specified,  only one is required) are varied by a frac-
  4641.                tion W about their initial values (later scaled down by
  4642.                the  gradient of the change in X) to attempt to get ac-
  4643.                cumulator or cell X to equal  accumulator  or  cell  A.
  4644.                This  is  done for I iterations, where I is another ac-
  4645.                cumulator.  
  4646.  
  4647.   *U XQTCM command   will  execute  the  command  (terminated  by  the
  4648.                end-of-line), with any command except X or K permitted,
  4649.                from  inside  a cell.  This allows command files driven
  4650.                from cells to control moving data, etc.  
  4651.  
  4652.   *U STRVL V1,start;len 
  4653.  
  4654.                will  return  a  value  that  is  made  from  up  to  8
  4655.                characters in the FORMULA of cell V1 (where V1  is  any
  4656.                cell name), starting at character "start" and for "len"
  4657.  
  4658. AnalytiCalc Reference Manual                                   Page 92
  4659.  
  4660.  
  4661.  
  4662.                characters.  
  4663.  
  4664.   *U HERE 
  4665.  
  4666.                will  return the current location on the matrix and the
  4667.                current maximum row and column used.  T,U get col, row.
  4668.                W,Y get max col, row used.  
  4669.  
  4670.   *U FFTFW and *U FFTRV perform Fast Fourier Transforms in the forward
  4671.                and reverse (inverse) directions on the given range  of
  4672.                data.  
  4673.  
  4674.   *U LINEF Vy:Vy,Vx:Vx (with the Vx range optional) fits a line to the
  4675.                input range.  Eqn:  y=Ux+T.  % gets err,  W  gets  cor.
  4676.                coef.  
  4677.   *XV filename V1 
  4678.   *XF filename V1        The *X class commands are for sheet linkages. 
  4679.                *XF  loads  a  Formula  from another saved spreadsheet,
  4680.                while *XV loads a Value.  
  4681.  
  4682.  
  4683.  
  4684.       The  following  *U  DBxxxxxx functions also exist as commands of
  4685.  form FILxxxxxx with the same results.  
  4686.  
  4687.  
  4688.  
  4689.   *U  DBOPINS  range  filename  Open  input sequential on filename for
  4690.                cells in range When the input  file  is  open  and  any
  4691.                operation  causes  a read of the cell, the FORMULA will
  4692.                be taken from the file and used.  If the file is opened
  4693.                with  the OPINU option (for Update), then when the FOR-
  4694.                MULA of the cell is written, it will also write to  the
  4695.                file.   The  OPINU option applies only to random access
  4696.                files.  Initially both input and output reads are  dis-
  4697.                abled  (ENAINP and ENAOUT enable them).  When a sequen-
  4698.                tial file (or  device  such  as  a  mailbox,  pipe,  or
  4699.                communications  line) is used for input, it is advanta-
  4700.                geous to read data into  a  range  once,  then  disable
  4701.                input/output  again,  to allow it to be handled between
  4702.                these commands.  The EDTINP  and  FMTOUT  commands  are
  4703.                designed   to   do  this  to  make  it  easier  to  use
  4704.                AnalytiCalc for a filter between sequential files.  
  4705.  
  4706.   *U DBOPINR range filename Open input random on filename for cells in
  4707.                range 
  4708.  
  4709.   *U DBOPINU range filename Open range for update on filename for read
  4710.                and write as random access.  skip 1 
  4711.   *U DBCLSINP Close input 
  4712.  
  4713. AnalytiCalc Reference Manual                                   Page 93
  4714.  
  4715.  
  4716.  
  4717.  
  4718.   *U DBCLSOUT Close output 
  4719.  
  4720.   *U  DBOPOUTS  range filename Open output sequential from range cells
  4721.                to filename 
  4722.  
  4723.   *U DBOPOUTR range filename Open output random from range on filename 
  4724.  
  4725.   *U DBENAINP Enable input file readin (initially disabled) 
  4726.  
  4727.   *U DBENAOUT Enable output write (initially disabled) 
  4728.  
  4729.   *U DBDISINP Disable input area readin 
  4730.  
  4731.   *U DBDISOUT Disable output write 
  4732.  
  4733.   *U DBEDTINP range Enables input and output and, for each cell in the
  4734.                given range, reads and writes the  cell,  allowing  the
  4735.                file  read/writes to take effect.  Each cell is flagged
  4736.                as valid but of text type;  the DF command must be used
  4737.                to  reset  any  that  should  be treated as computable.
  4738.                Input and output are disabled on completion of the com-
  4739.                mand.  
  4740.  
  4741.   *U DBFMTOUT range 
  4742.   *U  DBVALOUT range Enables input and output and for each cell of the
  4743.                range takes the VALUE of the cell, reads the cell, sets
  4744.                it  of text type, and writes the text equivalent of its
  4745.                value to the cell.  In the FMTOUT  command  the  cell's
  4746.                display  format  is  used  for  the conversion.  In the
  4747.                VALOUT command a large builtin format is used  to  pre-
  4748.                serve  all  significant  digits.   Spaces are discarded
  4749.                prior to output.  Cells  are  left  containing  textual
  4750.                data  corresponding  to their numeric values, stored in
  4751.                the formulae.  The DF command  may  be  used  to  reset
  4752.                these  cells  to  numeric types if desired.  Conversion
  4753.                errors are ignored.  Input and output are  disabled  on
  4754.                completion of the command.  
  4755.  
  4756.   *U DBCMPFRM V1:V2[,V3:V4] Compares two formulas.  It returns, in the
  4757.                % accumulator, the index of the formula in cell  V2  in
  4758.                the formula in cell V1.  Lengths used are those of both
  4759.                formulas UNLESS the V3 and V4 cell arguments are  seen.
  4760.                In that case the value of V3 will be used as the length
  4761.                of the formula for V1 and the value of V4 will be  used
  4762.                as  the length of cell V2.  If either value in V3 or V4
  4763.                is outside the range 1 to 109 both values in V3 and  V4
  4764.                will be ignored.  Also on output the W accumulator will
  4765.                be set to -1.  if V1 is lexically earlier than  V2,  0.
  4766.                if  they  are  lexically  equal,  and  +1.   if  V1  is
  4767.  
  4768. AnalytiCalc Reference Manual                                   Page 94
  4769.  
  4770.  
  4771.  
  4772.                lexically later than V2.  
  4773.  
  4774.   *U  DBLENFRM  V1:V2 returns the length of the formula for cell V1 in
  4775.                the % accumulator and in cell V2 IF CELL V2  IS  VALID.
  4776.                Otherwise  the  cell specified in V2 is ignored, though
  4777.                it must be present in the command or function.  
  4778.  
  4779.   *U  DBTRMFRM  V1:V2,V3,V4 Reads the formula in V1 and uses V3 and V4
  4780.                as start and end byte numbers within it.  It returns to
  4781.                V2 the formula that is between the start and end bytes,
  4782.                trimming the V1 formula into V2 by chopping out the un-
  4783.                desired  parts.  The find substring function CMPFRM can
  4784.                be used to find delimiter bytes  if  absolute  columnar
  4785.                formatting  is not desired.  As in all these functions,
  4786.                CMPFRM and LENFRM have the forms 
  4787.  
  4788. AnalytiCalc Reference Manual                                   Page 95
  4789.  
  4790.  
  4791.  
  4792.                               Appendix E
  4793.                              NEW FEATURES
  4794.  
  4795.       The  following features were added to AnalytiCalc after the last
  4796.  edit to the manual:  
  4797.  
  4798.       1.  Extended cell addressing.  
  4799.  
  4800.       This  feature  allows  you to treat the spreadsheet as though it
  4801.  contained 18000 rows and 18000 columns.  You can use any  storage  in
  4802.  any  part of this range.  Thus, columns from A through ZPH are legal,
  4803.  and rows from 1 to 18000 are legal.  
  4804.  
  4805.       The actual storage in virtual memory is still treated as a prime
  4806.  area of 60 by 300 cells, but extended areas move down  the  sheet  as
  4807.  you go further to the right of the 60 columns, and right on the sheet
  4808.  as you go further down.  The increments on overflow start at 50  rows
  4809.  and  10  columns, but can be reset by questions in the "modify widths
  4810.  and mapping" section of the S (setup) command.  The  mappings  chosen
  4811.  are saved and restored in PP and GP commands.  
  4812.  
  4813.       This  allows  you  to use the storage as a giant area, though it
  4814.  can run out.  (No possible PCDOS machine could really compute  a  325
  4815.  million cell sheet, if all cells were full, quickly enough to be use-
  4816.  ful.) 
  4817.  
  4818.       Because  it can be confusing to figure out what is going on, the
  4819.  Add (AR and AA) commands that insert or delete whole rows or  columns
  4820.  do  not  work  in extended addresses (i.e., beyond 60 columns and 300
  4821.  rows).  When using extended addressing, and after you have cells  set
  4822.  up  in the extended area, you should NOT alter the mappings via the S
  4823.  command, nor should you use the AA or AR commands.   All  other  com-
  4824.  mands work normally.  
  4825.  
  4826.       3.  The sheet save and restore now saves values in a PPX command
  4827.  as well as formulas.  It also saves column widths and the  number  of
  4828.  rows  and  columns being displayed.  If you specify a 4th character M
  4829.  in the command (e.g., PPXM instead of  just  PPX),  AnalytiCalc  will
  4830.  save  the  display-to-physical  mapping in its saved sheet as well as
  4831.  the other sheet information.  This  considerably  extends  the  saved
  4832.  size, so it is optional.  Setting up your mapping while journaling is
  4833.  turned on, and then playing back a journal file, will still use  sub-
  4834.  stantially  less  disk  space, though having all the information in a
  4835.  saved sheet makes reload simpler.  
  4836.           The PP commands have now the following effects:  
  4837.           PPN  Save  numerical values (and labels) only.  Formulas are
  4838.                NOT stored;  only numeric values are.  
  4839.           PPX Save both numeric values and formulas.  The output files
  4840.                contain two records per cell used, one  containing  the
  4841.                value and the other containing the formula.  On reload,
  4842.  
  4843. AnalytiCalc Reference Manual                                   Page 96
  4844.  
  4845.  
  4846.  
  4847.                the value record sets the cell value, and  the  formula
  4848.                record  sets  the formula (which may cause the value to
  4849.                change once a recalculation is done).  The value record
  4850.                is  first  and it's first character is "p" (lower case)
  4851.                while the  formula  record's  first  character  is  "P"
  4852.                (upper  case).  See the BASIC graphics programs for how
  4853.                to read the format, or type a saved sheet  out  to  see
  4854.                how it looks.  Use this form of save for most purposes. 
  4855.           PPF  Saves formulas only, not values (though a single recal-
  4856.                culation generally produces values).  Use this for tem-
  4857.                plates  where  the data values are not meaningful or to
  4858.                save room.  This sort of save cannot  however  be  used
  4859.                for  graphics, and the *XV command will not find useful
  4860.                values everywhere in such a saved sheet.  
  4861.           PDN  Saves  Display sheet numerically only.  Like PPN except
  4862.                that the offsets used are in Display  coordinates,  not
  4863.                relative to the physical sheet.  
  4864.           PDF  Saves  Display  sheet, Formulas only.  No display sheet
  4865.                save of "both"  numbers  and  formulas  is  implemented
  4866.                since  the  display  sheet is smaller than the physical
  4867.                one and two saves can be  easily  done  when  both  are
  4868.                needed.  
  4869.           PxxM Where "xx" can be PN, PF, DN, DF, or PX - Saves Mapping
  4870.                as well as the sheet.  This saves extra  records  (with
  4871.                row  and  column  numbers  offset by 64000 to keep them
  4872.                from confusing graphics programs) that allow Get (GP or
  4873.                GD  or  GPR) commands to set up the display to physical
  4874.                sheet mappings automatically.  Thus, you can  save  all
  4875.                your  windows  and  have  them  back  automatically  on
  4876.                reload.  The mapping is saved from the  current  cursor
  4877.                location down and right only.  
  4878.           The  G  (Get)  class commands are unchanged except that they
  4879.                now reset all the new saved quantities  when  they  are
  4880.                seen.   Old saved sheets receive default values for the
  4881.                column widths, numbers of rows/columns,  mapping,  etc.
  4882.                so their behavior is not altered.  
  4883.  
  4884.       V18-04 has the following new features:  
  4885.  
  4886.       1.   If  you have an ACINIT.PRM file, it will be kept open as an
  4887.  initializer file until EOF and may contain any AnalytiCalc  commands.
  4888.  HOWEVER, if you use the file, it MUST contain at least the replies to
  4889.  all questions until you  arrive  at  the  spreadsheet's  "calculation
  4890.  screen".   It  can  be  used to preset cell contents or perform other
  4891.  setups.  Note that the ZA command allows you to reset storage parame-
  4892.  ters  and  the  like, so having them preset by a startup file in this
  4893.  way does not reduce the generality of the program.   It  is  often  a
  4894.  good  policy to do this to get the program started, as the setup com-
  4895.  mand can contain typed strings to initialize ANSI.SYS or  to  set  up
  4896.  internal  function key meanings without having to rely on an operator
  4897.  
  4898. AnalytiCalc Reference Manual                                   Page 97
  4899.  
  4900.  
  4901.  
  4902.  or   an   external   batch   file   to   do    so.     The    command
  4903.  %escape sequence to type%*%*% will just type the escape sequence;  it
  4904.  may be used in ACINIT.PRM (after the part that answers initial  ques-
  4905.  tions) to type any desired escape sequences for setting up the screen
  4906.  or whatever if that screen control method is chosen.  
  4907.  
  4908.  
  4909.       L AO0
  4910.  ET 1
  4911.  L AW0
  4912.  ET 2
  4913.  L AR0
  4914.  ET 3
  4915.  L AT0
  4916.  ET 4
  4917.  L A1
  4918.  
  4919.  Note  that AB0 corresponds to code 59, and so on.  AO0 corresponds to
  4920.  72, AW0 to 80, AR0 to 75, and AT0 to 77 here.  The  1,2,3,or  4  that
  4921.  are  entered are the cursor move commands in command mode, entered as
  4922.  text so they cause no calculation overhead.  Note that IF YOU HAVE AN
  4923.  ACINIT.PRM, IT will be read, NOT your console, for initial questions.
  4924.  (You can get the initial queries back with the ZA command however.) 
  4925.  
  4926.  
  4927.  
  4928.                         New Features of V18-07B
  4929.  
  4930.       AnalytiCalc  V18-07B  supports  use  for project management.  To
  4931.  make this run efficiently, the selection functions were  modified  to
  4932.  record  which  cell  was selected.  Thus, the MAX, MIN, LKP, LKN, and
  4933.  LKE functions now return the column and  row  (respectively)  of  the
  4934.  cell  they  find  in accumulators P and Q respectively.  The function
  4935.  "*P@ P0,Q0" may be used to directly access this  cell  in  subsequent
  4936.  calculations,  or the P and Q accumulators can be used in other forms
  4937.  of addressing to access the selected cells.  The functions  otherwise
  4938.  behave as they did in earlier releases.  
  4939.  
  4940.       The   project   management  software  (AnalytiProject)  will  be
  4941.  distributed only to registered (i.e., paying) users of AnalytiCalc.  
  4942.                         New Features - V18-07C
  4943.  
  4944.       AnalytiCalc  V18-07C  adds two functions to support computations
  4945.  in "workdays".  
  4946.  
  4947.          *U WKDYS V1,V2 
  4948.  
  4949.  takes  Julian dates in variables V1 and V2 and computes the number of
  4950.  workdays between the two, not counting the initial date if  it  is  a
  4951.  workday (to be similar to differences between Julian dates).  
  4952.  
  4953. AnalytiCalc Reference Manual                                   Page 98
  4954.  
  4955.  
  4956.  
  4957.  
  4958.          *U WKDIN V1,V2 
  4959.  
  4960.  takes  a Julian date in V1 and a number of days in V2 and returns the
  4961.  Julian date that is V2 workdays after the date in V1.  It is  thus  a
  4962.  sort  of  inverse  for  the *U WKDYS function.  The resulting date is
  4963.  guaranteed to be in the Monday to Friday range.  A workday is  Monday
  4964.  to Friday.  The functions know nothing of holidays.  
  4965.                         New Features - V18-08A
  4966.  
  4967.       In  V18-08A,  AnalytiCalc can compute line fits and Fast Fourier
  4968.  transforms on data.  
  4969.  
  4970.          *U LINEF Y1:Y2,X1:X2 
  4971.  
  4972.  computes  a line whose equation is Y=mX+B, where m is returned in the
  4973.  U accumulator and B is returned in the T accumulator.  The %  accumu-
  4974.  lator returns the fitting error in Y.  The line is fit over the range
  4975.  Y1:Y2 in Y, with the X coordinates optional and if they are  present,
  4976.  they  must  be in the cells in the X1:X2 range given.  If the X range
  4977.  is omitted, 1.  to the max.  number of points will be used.  
  4978.  
  4979.          *U FFTFW V1:V2 
  4980.  
  4981.  computes the forward (t to freq) Fourier transform of the range and 
  4982.  
  4983.          *U FFTRV V1:V2 
  4984.  
  4985.  computes the reverse (freq.  to t) transform.  The range  must  be  a
  4986.  power  of two long (if less, the largest power of 2 available is used
  4987.  and extra points are ignored).  Data is assumed to be the real  coef-
  4988.  ficients in the first half and the imaginary ones in the second half.
  4989.  FFT data is returned in this layout also.  Thus, the real data (which
  4990.  is  frequently  the part of interest) is returned first.  The reverse
  4991.  FFT of the forward FFT returns the original data.  The FFT is of  in-
  4992.  terest for finding the frequency distribution of partially sinusoidal
  4993.  distributions.  
  4994.  
  4995.                         New Features - V19.01A
  4996.  
  4997.       A  modified command structure is supported now.  If you type the
  4998.  command /;  then the commands to AnalytiCalc are modified as follows: 
  4999.  
  5000.  
  5001.       1.  Any  command  beginning  with  a digit (except single digits
  5002.           standing alone) is treated as an EV followed by the text.  
  5003.  
  5004.       2.  Any  command beginning with / has the / stripped off and the
  5005.           rest is treated as a command.  
  5006.  
  5007.  
  5008. AnalytiCalc Reference Manual                                   Page 99
  5009.  
  5010.  
  5011.  
  5012.       3.  Any  command  beginning  with  " is treated as an E" command
  5013.           (enter text) with the " stripped out.  
  5014.  
  5015.       4.  Anything not starting with a digit, a " character, or a / is
  5016.           treated as an Enter command and is prefixed with "EN  "  and
  5017.           used.  
  5018.  
  5019.  
  5020.       The old (default) command mode is restored with the command "//"
  5021.  so that /;  and // switch between the two.   These  commands  may  be
  5022.  given  in ACINIT.PRM, other command files, or from the console.  They
  5023.  introduce incompatibilities in that in the new version commands  like
  5024.  "DF  range [format]" must be entered as "/DF range [format]" (for ex-
  5025.  ample) to work.  
  5026.  
  5027.       To  facilitate writing command files that work in both modes the
  5028.  command / switches  the  mode  with  a  save  cell.   A  sequence  of
  5029.  commands:  
  5030.  
  5031.   /#             (save current command mode in save cell)
  5032.   //             (enter old command mode)
  5033.  ...
  5034.   (do all of command file)
  5035.  /#              (restore saved user command mode)
  5036.  
  5037.  will  allow  a command file to operate and be written to run predict-
  5038.  ably in either user environment choice.  
  5039.  
  5040.       Please  NOTE  that special characters in the first character are
  5041.  interpreted as commands in /;  mode.  The * character is handled as a
  5042.  comment.   To  enter formulas with functions starting with *, use the
  5043.  COMMAND form, e.g.  /EV *U IDATE.  This always works  and  disambigu-
  5044.  ates syntax.  
  5045.  
  5046.       When the system is in /;  mode, the cell prompt at the 23rd line
  5047.  of the screen ends with :  so that it appears like 
  5048.  
  5049.  AB 21:  
  5050.  
  5051.       When  the system is in // mode (initial default) the prompt ends
  5052.  with the > character so it appears like 
  5053.  
  5054.  AB 21> 
  5055.  
  5056.  This should aid in distinguishing modes during use.  
  5057.                          New Features of V19.2
  5058.  
  5059.       In  V19.2, AnalytiCalc adds the OAD and ORD commands.  These are
  5060.  like the OA and OR commands except they leave the  relative  mappings
  5061.  of  the  screen alone.  Thus, if you already split your screen into 3
  5062.  
  5063. AnalytiCalc Reference Manual                                  Page 100
  5064.  
  5065.  
  5066.  
  5067.  parts and use the command "OAD cell" to reset the mapping, the resul-
  5068.  tant screen still has 3 regions at the same relative positions as be-
  5069.  fore.  If you use the ORD command, then only the part of  the  screen
  5070.  right and down from the cursor is affected, but any screen partition-
  5071.  ing is maintained.  If these commands leave some  areas  pointing  to
  5072.  nonexistent  areas, use a command OR or OA to reset the areas desired
  5073.  to something real again.  V19.2 added the change from > to :  at  the
  5074.  end of the prompt depending on // or /;  modes also.  
  5075.  
  5076.       New Features - V19-03A 
  5077.  
  5078.       The  recalculation  has added 2 new modes in V19-03, Recalculate
  5079.  Incremental (the initial default), and Recalculate Entry.  
  5080.  
  5081.       The R command re-establishes the old default mode which recalcu-
  5082.  lates ALL formulas  on  the  whole  sheet  for  every  entry  of  new
  5083.  material.  
  5084.  
  5085.       The RI command sets Recalc Incremental mode which recomputes all
  5086.  cells on the display screen, but skips non-displayed cells.  
  5087.  
  5088.       The  RE command sets Recalc Entry mode which ONLY recomputes the
  5089.  newly entered formula, leaving the rest alone.  (It  is  reliable  in
  5090.  the  "prime"  region  of  the  sheet but may fail in extended address
  5091.  areas.) 
  5092.  
  5093.       The  RR command is equivalent to RF (Recalculate, FORCE recompu-
  5094.  tation of constants), EXCEPT that it leaves  the  mode  alone  so  if
  5095.  AnalytiCalc is in RI or RE mode, it stays that way.  
  5096.  
  5097.       Note  a  full  recalculation is done after Get commands (loading
  5098.  saved sheets) regardless of mode.  
  5099.  
  5100.       The  command  ..  (two periods at the start of a line) in a com-
  5101.  mand file closes the command file and returns to the  console.   This
  5102.  has  not  previously  been  documented  though  the function has been
  5103.  present for some time.  
  5104.  
  5105.       It  is recommended that RE or RI mode be used instead of RM mode
  5106.  (which completely disables recalculation) during data entry if  other
  5107.  modes are too slow.  AnalytiCalc may be obtained from Glenn Everhart,
  5108.  25 Sleigh Ride Rd., Glen Mills, PA 19342, for $25.00 (I'll supply the
  5109.  disk for that;  I ask only $10.  to register it however.) 
  5110.  
  5111. AnalytiCalc Reference Manual                                  Page 101
  5112.  
  5113.  
  5114.  
  5115.                                  INDEX
  5116.  
  5117.  
  5118.  *XV Function 
  5119.  
  5120.  AA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   95
  5121.  AA Command . . . . . . . . . . . . . . . . . . . . . . . . . . .   11
  5122.  Access to Saved Sheets . . . . . . . . . . . . . . . . . . . . .   71
  5123.  Accumulators . . . . . . . . . . . . . . . . . . . . . . . . . .   29
  5124.  ACINIT.PRM . . . . . . . . . . . . . . . . . . . . . . . . .   96, 97
  5125.  AR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   95
  5126.  AR Command . . . . . . . . . . . . . . . . . . . . . . . . . . .   11
  5127.  Arguments  . . . . . . . . . . . . . . . . . . . . . . . . . . .   29
  5128.  Auto Motion 
  5129.  Availability . . . . . . . . . . . . . . . . . . . . . . . . .    100
  5130.  AVE Function . . . . . . . . . . . . . . . . . . . . . . . .   24, 86
  5131.  AVG function . . . . . . . . . . . . . . . . . . . . . .   24, 25, 86
  5132.  
  5133.  Boolean Functions  . . . . . . . . . . . . . . . . . . .   24, 25, 86
  5134.  
  5135.  C Command 
  5136.  Calculation Order  . . . . . . . . . . . . . . . . . . . . . . .   52
  5137.  Case Conversion  . . . . . . . . . . . . . . . . . . . . . . . .   22
  5138.  Cell Addressing  . . . . . . . . . . . . . . . . . . . . . . . .   95
  5139.  Cell Commands  . . . . . . . . . . . . . . . . . . . . . . . . .   31
  5140.  Cell Names . . . . . . . . . . . . . . . . . . . . . . . . .   32, 87
  5141.  Cell Precision . . . . . . . . . . . . . . . . . . . . . . . . .   77
  5142.  Column Width Set . . . . . . . . . . . . . . . . . . . . . . . .   19
  5143.  Command Arguments  . . . . . . . . . . . . . . . . . . . . . . .   20
  5144.  Command File Limitations . . . . . . . . . . . . . . . . . . . .   33
  5145.  Command Files  . . . . . . . . . . .   31, 32, 33, 49, 52, 61, 87, 89
  5146.  COMMAND MACROS 
  5147.  COMMANDS . . . . . . . . . . . . . . . . . . . . . . . . . . . .    7
  5148.  Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . .   51
  5149.  Conditional Loops 
  5150.  Conditional Motion . . . . . . . . . . . . . . . . . . . . .   61, 89
  5151.  Console Arguments  . . . . . . . . . . . . . . . . . . . . . . .   52
  5152.  Copy 
  5153.  Current Position . . . . . . . . . . . . . . . . . . . . . . . .    7
  5154.  Cursor Motion 
  5155.  
  5156.  Data Base Access . . . . . . . . . . . . . . . . . . . . . . . .   32
  5157.  DB Command . . . . . . . . . . . . . . . . . . . . . . . . . . .   13
  5158.  DF Command . . . . . . . . . . . . . . . . . . . . . . . . . . .   14
  5159.  Display  . . . . . . . . . . . . . . . . . . . . . . . . . . . .    7
  5160.  Display Format . . . . . . . . . . . . . . . . . . . . . . . . .   14
  5161.  Display Type . . . . . . . . . . . . . . . . . . . . . . . . . .   19
  5162.  Displayed Entity . . . . . . . . . . . . . . . . . . . . . . . .   15
  5163.  DL Command 
  5164.  DS Command . . . . . . . . . . . . . . . . . . . . . . . . . . .   18
  5165.  
  5166. AnalytiCalc Reference Manual                                  Page 102
  5167.  
  5168.  
  5169.  
  5170.  DT Command . . . . . . . . . . . . . . . . . . . . . . . . . . .   19
  5171.  DW Command . . . . . . . . . . . . . . . . . . . . . . . . . . .   19
  5172.  
  5173.  E Command  . . . . . . . . . . . . . . . . . . . . . . . . . . .   21
  5174.  EDIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   20
  5175.  EDIT, Special Constructs . . . . . . . . . . . . . . . . . . . .   20
  5176.  EMPTY CELLS 
  5177.  ENTER Command  . . . . . . . . . . . . . . . . . . . . . . . . .   21
  5178.  Equation Solving . . . . . . . . . . . . . . . . . . . . . .   68, 91
  5179.  Exit 
  5180.  Extended Area  . . . . . . . . . . . . . . . . . . . . . . . . .   95
  5181.  Extract Saved Value 
  5182.  
  5183.  F Command 
  5184.  FFT 
  5185.  FFTFW function . . . . . . . . . . . . . . . . . . . . . . . . .   98
  5186.  FFTRV Function . . . . . . . . . . . . . . . . . . . . . . . . .   98
  5187.  File Loading 
  5188.  File Merging 
  5189.  FORMAT . . . . . . . . . . . . . . . . . . . . . . . . . . .    5, 14
  5190.  FORMAT Microtutorial . . . . . . . . . . . . . . . . . . . . . .   16
  5191.  Formula Indirection  . . . . . . . . . . . . . . . . . . . . . .   27
  5192.  Formula Length . . . . . . . . . . . . . . . . . . . . . . . . .   33
  5193.  FORMULA SEARCH . . . . . . . . . . . . . . . . . . . . . . . . .   48
  5194.  Formula to Text  . . . . . . . . . . . . . . . . . . . . . .   14, 22
  5195.  Formula Value Access . . . . . . . . . . . . . . . . . . . .   70, 91
  5196.  Formulas . . . . . . . . . . . . . . . . . . . . . .   22, 32, 33, 87
  5197.  Fourier Transforms 
  5198.  Frame Editing 
  5199.  Freeze . . . . . . . . . . . . . . . . . . . . . . . . . . .   61, 88
  5200.  Function Arguments 
  5201.  Function Summary . . . . . . . . . . . . . . . . . . . . . . . .   86
  5202.  Functions  . . . . . . . . . . . . . . . . . . .   24, 29, 56, 60, 87
  5203.  FVL (Future Value) function  . . . . . . . . . . . . . . . . . .   86
  5204.  FVL Function . . . . . . . . . . . . . . . . . . . . . . . . . .   24
  5205.  
  5206.  G Command  . . . . . . . . . . . . . . . . . . . . . . . . . . .   36
  5207.  Goal Seeking . . . . . . . . . . . . . . . . . . . . . . . .   68, 91
  5208.  GOTO (Locate) Command  . . . . . . . . . . . . . . . . . . . . .   38
  5209.  Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . .   43
  5210.  
  5211.  Help . . . . . . . . . . . . . . . . . . . . . . . . . . . .   22, 37
  5212.  Hexadecimal  . . . . . . . . . . . . . . . . . . . . . . . . . .   58
  5213.  Histograms 
  5214.  
  5215.  IF conditional . . . . . . . . . . . . . . . . . . . . .   24, 25, 86
  5216.  IF statement . . . . . . . . . . . . . . . . . . . . . . . . . .   29
  5217.  Indirect Addressing 
  5218.  Indirect Cell References . . . . . . . . . . . . . . . . . . . .   30
  5219.  Indirect Command Execution . . . . . . . . . . . . . . . . . . .   70
  5220.  
  5221. AnalytiCalc Reference Manual                                  Page 103
  5222.  
  5223.  
  5224.  
  5225.  Initialization . . . . . . . . . . . . . . . . . . . . . . . . .   96
  5226.  Input Region . . . . . . . . . . . . . . . . . . . . . . . .   72, 73
  5227.  Insert or Delete Rows or Columns . . . . . . . . . . . . . . . .   11
  5228.  Integers . . . . . . . . . . . . . . . . . . . . . . . . . . . .   19
  5229.  Interactive Calculator . . . . . . . . . . . . . . . . . . . . .   50
  5230.  Internal Loops . . . . . . . . . . . . . . . . . . . . . . . . .   51
  5231.  IRR function (Internal Rate of Return) . . . . . . . . .   24, 25, 86
  5232.  
  5233.  Journaling . . . . . . . . . . . . . . . . . . . . . . . . . . .   49
  5234.  
  5235.  Keypad Command Files . . . . . . . . . . . . . . . . . . . . . .   22
  5236.  Keypad Commands  . . . . . . . . . . . . . . . . . . . . . . . .   22
  5237.  Keystroke Capture  . . . . . . . . . . . . . . . . . . . . . . .   49
  5238.  
  5239.  L Command  . . . . . . . . . . . . . . . . . . . . . . . . . . .   38
  5240.  Line Fits  . . . . . . . . . . . . . . . . . . . . . . . . . . .   98
  5241.  LINEF function . . . . . . . . . . . . . . . . . . . . . . . . .   98
  5242.  Linking Sheets . . . . . . . . . . . . . . . . . . . . . . . . .   34
  5243.  LKP, LKN, LKE Lookup Functions . . . . . . . . . . . . .   24, 25, 86
  5244.  Loading Saved Sheet  . . . . . . . . . . . . . . . . . . . . . .   36
  5245.  Locate current . . . . . . . . . . . . . . . . . . . . . . . . .   38
  5246.  Lookups 
  5247.  Looping  . . . . . . . . . . . . . . . . . . . . . . . .   51, 61, 89
  5248.  
  5249.  M Command 
  5250.  Matrix Algebra . . . . . . . . . . . . . . . . . . . . . . . . .   66
  5251.  Matrix restrictions  . . . . . . . . . . . . . . . . . . . . . .   63
  5252.  MAX function . . . . . . . . . . . . . . . . . . . . . .   24, 25, 86
  5253.  MEMORY USE . . . . . . . . . . . . . . . . . . . . . . . . . . .    6
  5254.  MH Command . . . . . . . . . . . . . . . . . . . . . . . . . . .   39
  5255.  MIN function . . . . . . . . . . . . . . . . . . . . . .   24, 25, 86
  5256.  Mixed Relocatable Names 
  5257.  Mixed Relocation Override  . . . . . . . . . . . . . . . . . . .   28
  5258.  MOD Modulo function  . . . . . . . . . . . . . . . . . .   24, 25, 86
  5259.  Moving . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   38
  5260.  MS command . . . . . . . . . . . . . . . . . . . . . . . . . . .   39
  5261.  Multiple Equations . . . . . . . . . . . . . . . . . . . . .   23, 30
  5262.  
  5263.  New Features . . . . . . . . . . . . . . . . . . . . . . . . . .   95
  5264.  Notes  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   52
  5265.  NPV (Net Present Value) Function . . . . . . . . . . . .   24, 25, 86
  5266.  NS No Scroll (Scroll Disable)  . . . . . . . . . . . . . . . . .   10
  5267.  Number Format  . . . . . . . . . . . . . . . . . . . . . . .   52, 53
  5268.  
  5269.  OA command . . . . . . . . . . . . . . . . . . . . . . . . . . .   40
  5270.  OAD command  . . . . . . . . . . . . . . . . . . . . . . . . . .   40
  5271.  Octal  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   58
  5272.  OR command . . . . . . . . . . . . . . . . . . . . . . . . . . .   40
  5273.  ORD command  . . . . . . . . . . . . . . . . . . . . . . . . . .   40
  5274.  Origin Control Commands  . . . . . . . . . . . . . . . . . . . .   40
  5275.  
  5276. AnalytiCalc Reference Manual                                  Page 104
  5277.  
  5278.  
  5279.  
  5280.  Other Features . . . . . . . . . . . . . . . . . . . . . . . . .   75
  5281.  Other Functions  . . . . . . . . . . . . . . . . . . . .   30, 59, 60
  5282.  Output Region  . . . . . . . . . . . . . . . . . . . . . . .   72, 73
  5283.  
  5284.  P Command  . . . . . . . . . . . . . . . . . . . . . . . . . . .   43
  5285.  PARAMETER SUBSTITUTION 
  5286.  PMT Function . . . . . . . . . . . . . . . . . . . . . . . .   24, 86
  5287.  Position Independent Cell Names  . . . . . . . . . . . . . . . .   33
  5288.  Position Independent Names . . . . . . . . . . . . . . . . . . .   27
  5289.  PPF command 
  5290.  PPX Command  . . . . . . . . . . . . . . . . . . . . . . . . . .   95
  5291.  Prime Area . . . . . . . . . . . . . . . . . . . . . . . . . . .   95
  5292.  Printing Large Reports . . . . . . . . . . . . . . . . . . . . .   18
  5293.  Project Management 
  5294.  
  5295.  Random Numbers 
  5296.  Ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   28
  5297.  RB COMMAND . . . . . . . . . . . . . . . . . . . . . . . . . . .   45
  5298.  RECALCULATE  . . . . . . . . . . . . . . . . . . . . . . . . . .    4
  5299.  Recalculation  . . . . . . . . . . . . . . . . . . . . . . . . .   52
  5300.  Redraw Command . . . . . . . . . . . . . . . . . . . . . . . . .   46
  5301.  Relations  . . . . . . . . . . . . . . . . . . . . . . . . . . .   29
  5302.  RELOCATE BOUNDARY  . . . . . . . . . . . . . . . . . . . . . . .   45
  5303.  Relocation . . . . . . . . . . . . . . . . . . . . . . . . .   11, 33
  5304.  Replicating 
  5305.  RND Function 
  5306.  
  5307.  S Command  . . . . . . . . . . . . . . . . . . . . . . .    6, 43, 95
  5308.  SAVE . . . . . . . . . . . . . . . . . . . . . . . . . . . .    6, 43
  5309.  SC Scroll enable . . . . . . . . . . . . . . . . . . . . . . . .   10
  5310.  Scatter Plots 
  5311.  SCRATCH FILES  . . . . . . . . . . . . . . . . . . . . . . . . .    6
  5312.  Scrolling control  . . . . . . . . . . . . . . . . . . . . . . .   10
  5313.  Self Location  . . . . . . . . . . . . . . . . . . . . . . . . .   71
  5314.  Set Title  . . . . . . . . . . . . . . . . . . . . . . . . . . .    6
  5315.  Setting Number of Cols . . . . . . . . . . . . . . . . . . . . .   13
  5316.  Setting Number of Rows . . . . . . . . . . . . . . . . . . . . .   13
  5317.  Solving For Variables  . . . . . . . . . . . . . . . . . . .   68, 91
  5318.  Sorting  . . . . . . . . . . . . . . . . . . . . . . . .   18, 70, 91
  5319.  Sorting, by ASCII  . . . . . . . . . . . . . . . . . . . . .   70, 91
  5320.  Special Accumulators . . . . . . . . . . . . . . . . . . . . . .   55
  5321.  Special Cell Addressing  . . . . . . . . . . . . . . . . . . . .   27
  5322.  Startup control  . . . . . . . . . . . . . . . . . . . . . . . .   97
  5323.  STD (Std Deviation) function . . . . . . . . . . . . . .   24, 25, 86
  5324.  Storage Allocation . . . . . . . . . . . . . . . . . . . . . . .   82
  5325.  String Functions . . . . . . . . . . . . . . . . . . . . . .   72, 73
  5326.  Subprocess Execution . . . . . . . . . . . . . . . . . . . . . .   50
  5327.  SUM function . . . . . . . . . . . . . . . . . . . . . .   24, 25, 86
  5328.  Symbolic Names . . . . . . . . . . . . . . . . . . . . . . . . .   84
  5329.  
  5330.  
  5331. AnalytiCalc Reference Manual                                  Page 105
  5332.  
  5333.  
  5334.  
  5335.  TE Command 
  5336.  Temp.  Escape to Monitor . . . . . . . . . . . . . . . . . . . .   50
  5337.  Temporary Motion 
  5338.  Temporary Move . . . . . . . . . . . . . . . . . . . . . . .   61, 88
  5339.  TEst Compute 
  5340.  Text Entry . . . . . . . . . . . . . . . . . . . . . . . . . . .   22
  5341.  Text to Formula  . . . . . . . . . . . . . . . . . . . . . .   14, 22
  5342.  TITLE  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    6
  5343.  
  5344.  Value Freeze 
  5345.  Variable Names . . . . . . . . . . . . . . . . . . . . . . . . .   27
  5346.  VARY . . . . . . . . . . . . . . . . . . . . . . . . . . . .   68, 91
  5347.  VIEW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    4
  5348.  View Command . . . . . . . . . . . . . . . . . . . . . . . . . .   46
  5349.  View Control . . . . . . . . . . . . . . . . . . . . . . . . . .   60
  5350.  
  5351.  W Command  . . . . . . . . . . . . . . . . . . . . . . . . . . .   47
  5352.  Weekdays Functions . . . . . . . . . . . . . . . . . . . . . . .   98
  5353.  Where Matrices Can Be  . . . . . . . . . . . . . . . . . . . . .   63
  5354.  Windows  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   40
  5355.  Word Processing  . . . . . . . . . . . . . . . . . . . . . . . .   35
  5356.  Workfiles  . . . . . . . . . . . . . . . . . . . . . . . . . . .   82
  5357.  Writing Screen to File or Print  . . . . . . . . . . . . . . . .   47
  5358.  
  5359.  X Command 
  5360.  
  5361.  ZAP Sheet Command  . . . . . . . . . . . . . . . . . . . . . . .   48
  5362.  ZEro Command . . . . . . . . . . . . . . . . . . . . . . . . . .   48
  5363.  
  5364.